DefaultLoggerFactory
public class DefaultLoggerFactory : ContextualLoggerFactory, DebugReportable
The default Focus-aware filtering logger factory.
This creates contextual loggers that support Focus to restrict logging to specific features at runtime.
Note that Flint supports log levels per topic path (e.g. by Feature) even without setting one or more focused features.
This means you can run all your subsystems at info
level but turn your app loggic to debug
for example.
-
Undocumented
Declaration
Swift
public static let noSessionName: String
-
Declaration
Swift
public var level: LoggerLevel { get set }
-
Declaration
Swift
public let name: String
-
Undocumented
Declaration
Swift
public init(name: String, level: LoggerLevel, output: AggregatingLoggerOutput)
-
Declaration
Swift
public func setLevel(for topic: TopicPath, to level: LoggerLevel?)
-
Declaration
Swift
public func contextualLogger(with context: LogEventContext) -> ContextSpecificLogger
-
Declaration
Swift
public func contextualLogger(activity: String, topicPath: TopicPath) -> ContextSpecificLogger
-
Declaration
Swift
public func add(output: LoggerOutput)
-
Undocumented
Declaration
Swift
public func copyReport(to path: URL, options: Set<DebugReportOption>)
-
Quick setup default logging behaviours, tracking the specified hierarchy of features.
Declaration
Swift
public static func setup(initialDevelopmentLogLevel: LoggerLevel = .debug, initialProductionLogLevel: LoggerLevel = .off, briefLogging: Bool = true)