We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf804fe commit f2e432fCopy full SHA for f2e432f
packages/traceloop-sdk/src/lib/configuration/index.ts
@@ -71,13 +71,6 @@ export const initialize = (options: InitializeOptions) => {
71
72
_configuration = Object.freeze(options);
73
74
- if (options.logLevel) {
75
- diag.setLogger(
76
- new DiagConsoleLogger(),
77
- logLevelToOtelLogLevel(options.logLevel),
78
- );
79
- }
80
-
81
if (!options.silenceInitializationMessage) {
82
console.log(
83
`Traceloop exporting traces to ${
@@ -87,6 +80,13 @@ export const initialize = (options: InitializeOptions) => {
87
}
88
89
if (options.tracingEnabled === undefined || options.tracingEnabled) {
+ if (options.logLevel) {
84
+ diag.setLogger(
85
+ new DiagConsoleLogger(),
86
+ logLevelToOtelLogLevel(options.logLevel),
+ );
+ }
+
90
startTracing(_configuration);
91
92
0 commit comments