Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey @ppeelen,
thank you for your work on this project!
I tried to use it in an executable within a swift package, but unfortunately, it crashed.
Bundle.main.bundleIdentifier
is an optional value, because there is no bundle identifier in non-bundled applications.The crash occurred because of the forced unwrap of
bundleIdentifier
in the initializer of the logger. First I thought about making the value for the parametersubsystem
accessible from outside, but I think it would be nicer to have https://github.com/apple/swift-log as a logging system.This approach would allow users of this package to decide where to log, by using log handlers (which can still be os.log).
What do you think about this approach? Would you be open to considering a transition to SwiftLog for flexibility in logging?