mirror of
https://github.com/apple/swift-log
synced 2026-11-24 03:47:49 +00:00
Motivation: When using the same Logger across an application in combination with the default StreamLogHandler, it may be difficult to differentiate between logs produced by different modules. ServiceLifecycle works around this by prepending the log message with [Lifecycle], which is what I'd like to do StreamLogHandler by default, leveraging the source log parameter. Modifications: StreamLogHandler will include the source in brackets right before the log message when writing a log. Result: Logs from different modules are easily differentiable when produced using the same Logger instance.