Skip to content

Commit f219409

Browse files
author
nervenes
committed
include logger in the readme example
1 parent dbf0365 commit f219409

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ on each service.
6363

6464
```swift
6565
import ServiceLifecycle
66+
import Logging
6667

6768
actor FooService: Service {
6869
func run() async throws {
@@ -78,9 +79,12 @@ struct Application {
7879
let service1 = FooService()
7980
let service2 = FooService()
8081

82+
let logger = Logger(label: "Application")
83+
8184
let serviceGroup = ServiceGroup(
8285
services: [service1, service2],
83-
gracefulShutdownSignals: [.sigterm]
86+
gracefulShutdownSignals: [.sigterm],
87+
logger: logger
8488
)
8589

8690
try await serviceGroup.run()

0 commit comments

Comments
 (0)