-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make logging optional and update docs (#189)
Hello! 👋 This PR contains a few changes, notably: - Updating the ``README.md`` to use the new initializer instead of the deprecated one. - Add a ``renamed`` to the deprecated initializer. - Updating the docs to use the simpler initializer. - Make the ``logging`` parameter on the initializers optional, the motivation for this is in cases the user don't or can't do logging, they don't have to construct a logger and bootstrap the logging system with ``SwiftLogNoOpLogHandler``, so this code: ```swift LoggingSystem.bootstrap(SwiftLogNoOpLogHandler.init) let serviceGroup = ServiceGroup( services: [service], cancellationSignals: [.sigint], logger: .init(label: "") ) ``` becomes ```swift let serviceGroup = ServiceGroup( services: [service], cancellationSignals: [.sigint] ) ``` and it also allows the user to do logging outside the ServiceGroup without necessarily doing logging within it. If there is anything to improve, let me know! 😃 *thanks dimi and gwynne for helping along the way and answering my questions :)* --------- Co-authored-by: Franz Busch <[email protected]>
- Loading branch information
1 parent
0ee8bad
commit 0af4033
Showing
3 changed files
with
36 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters