Skip to content

Commit

Permalink
add default log level to initialize method (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
CyprienRicque authored Nov 6, 2023
1 parent a03eedc commit c19f585
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/ClientRuntime/Logging/SDKLoggingSystem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public class SDKLoggingSystem {
factories[label] = logHandlerFactory
}

public class func initialize() {
public class func initialize(defaultLogLevel: SDKLogLevel = .info) {
LoggingSystem.bootstrap { label in
if let factory = factories[label] {
return factory.construct(label: label)
}
var handler = StreamLogHandler.standardOutput(label: label)
handler.logLevel = .info
handler.logLevel = defaultLogLevel.toLoggerType()
return handler
}
}
Expand Down

0 comments on commit c19f585

Please sign in to comment.