Skip to content

Commit 72f330b

Browse files
Merge pull request PassiveLogic#2 from trinatafoya/chore/debug_info_logs
Change verbose Info logs to debug.
2 parents ed586cd + bd515f0 commit 72f330b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Sources/OpenTelemetrySdk/Trace/SpanBuilderSdk.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import Foundation
77

88
import OpenTelemetryApi
99
import SwiftyBeaver
10+
import Logging
1011

12+
let swiftLogger = Logger(label: "OpenTelemetrySDK")
1113
/// SpanBuilderSdk is SDK implementation of SpanBuilder.
1214
class SpanBuilderSdk: SpanBuilder {
1315
private enum ParentType {
@@ -159,7 +161,7 @@ class SpanBuilderSdk: SpanBuilder {
159161
OpenTelemetry.instance.contextProvider.setActiveSpan(createdSpan)
160162
}
161163

162-
SpanBuilderSdk.logger.info("SpanBuilderSdk.\(#function): created span: \(createdSpan)")
164+
swiftLogger.debug("SpanBuilderSdk.\(#function): created span: \(createdSpan)")
163165

164166
return createdSpan
165167
}
@@ -175,7 +177,7 @@ class SpanBuilderSdk: SpanBuilder {
175177
private func getParentContext(parentType: ParentType, explicitParent: Span?, remoteParent: SpanContext?) -> SpanContext? {
176178
let currentSpan = OpenTelemetry.getActiveSpan()
177179

178-
SpanBuilderSdk.logger.info("SpanBuilderSDK.\(#function): active span: \(String(describing: currentSpan))")
180+
swiftLogger.debug("SpanBuilderSDK.\(#function): active span: \(String(describing: currentSpan))")
179181

180182
var parentContext: SpanContext?
181183

Sources/OpenTelemetrySdk/Trace/SpanProcessors/SimpleSpanProcessor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public struct SimpleSpanProcessor: SpanProcessor {
3030
let span = span.toSpanData()
3131
let spanExporterAux = self.spanExporter
3232

33-
SimpleSpanProcessor.logger.info("SimpleSpanProcessor.\(#function): spanData: \(span)")
33+
swiftLogger.debug("SimpleSpanProcessor.\(#function): spanData: \(span)")
3434

3535
processorQueue.async {
3636
_ = spanExporterAux.export(spans: [span])

0 commit comments

Comments
 (0)