-
Notifications
You must be signed in to change notification settings - Fork 11
Description
I notice that the current implementation uses a deprecated API that does not include the source parameter and instead passes the logger label to the underlying persistent log store.
This means in effect if you want to have differently labelled logs in Pulse you need to create a separate Logger for each with a unique label.
SwiftLog now has a source parameter and it recommends that the source is used to identify the origin of the log entry rather than the logger label which identifies who created the logger.
https://github.com/apple/swift-log#source-vs-label
Conceptually it feels like you should be able to create a single logger and pass it around different modules and use the source to distinguish between subsystems. This would require updating the log handler to pass the source as the log label instead.
I’d be happy to open a PR if you think this change is the right one. Or do you think distinct modules or subsystems should just create their own Logger instead?