ContextualLoggerFactory
public protocol ContextualLoggerFactory : AnyObject
The low level interface for getting a logger.
This is the application-facing interface for logging, which will filter and if necessary prepare log entries for the underlying logging implementation.
Note
Flint supports log levels per topic path (e.g. by Feature) even without setting one or more focused features.
-
The log level. This can be changed at runtime.
Declaration
Swift
var level: LoggerLevel { get set }
-
A symbolic name for the factory
Declaration
Swift
var name: String { get }
-
Set a log level for a specific topic path. Set to nil to remove specific logging for that topic.
Declaration
Swift
func setLevel(for topic: TopicPath, to level: LoggerLevel?)
-
Get a contextual logger for the given context
Declaration
Swift
func contextualLogger(with context: LogEventContext) -> ContextSpecificLogger
-
Get a contextual logger for a non-Flint context where you still need to log things but the code is not aware of Action(s) and action dispatch. This at least allows non-Flint code to be passed loggers that have some contextual information
Declaration
Swift
func contextualLogger(activity: String, topicPath: TopicPath) -> ContextSpecificLogger
-
Internal function for adding outputs at runtime to facilitate Focus.
Declaration
Swift
func add(output: LoggerOutput)