-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow injecting different OSLog into the framework #18
Comments
Hi @edorphy, I definitely agree that it would be beneficial for the framework to provide a way to customize the logging parameters such as the subsystem. I'm not sure about this one though:
Due to |
Hey @insidegui, Generally speaking, I don't like logs of any sort being emitted that I'm not 100% in control of, this would at least put the developer using the library in control. But ultimately up to you; it is a forced habit of mine from my 9-to-5. As for potentially leaking implementation details, I can review usage of |
Sounds good, please do report if you notice any logging that's leaking private data in production builds. The reason why I don't think it's necessary for my own work is because That said, I'm not against letting users of the library disable logging altogether either, just gotta think of a way to do it that doesn't require me to change the way I use |
Hey @insidegui Thoughts on changing the interface of the logger to Apple's other type from here: https://github.com/apple/swift-log? I know Apple says "Don't wrap around OSLog" because you'll lose items like line number and such, however the current day console app doesn't print that information (to my knowledge). Your base implementation could use OSLog as the backing store, but it would allow flexibility if others (namely me) wanted to use something else. This is what I plan on doing eventually in the CloudKitWebServices library, as well as other items I'll eventually open source. |
I don't want to add an external dependency to MultipeerKit at this point. If you'd like to use SwiftLog, I'm afraid you'll have to create a separate fork. I'd like to move over to the more modern |
Hey Gui,
Both can be achieved by providing a logging factory mechanism that can be overridden.
These can both be achieved by creating a factory or configuration passed into the transceiver at construction time. What are your thoughts on this as a privacy enhancement?
First thing I do when logging is make an extension on OSLog or Logger types that just take a category, the subsystem is usually the main bundle identifier.
The text was updated successfully, but these errors were encountered: