Files
Evren SenandFranz Busch 0af4033d87 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 <privat@franz-busch.de>
2024-12-05 15:14:08 +00:00
..