Skip to content

Commit 1adb530

Browse files
authored
Only log at debug levels (#151)
1 parent 496c81c commit 1adb530

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Sources/ServiceLifecycle/ServiceGroup.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public actor ServiceGroup: Sendable {
264264

265265
switch service.successTerminationBehavior.behavior {
266266
case .cancelGroup:
267-
self.logger.error(
267+
self.logger.debug(
268268
"Service finished unexpectedly. Cancelling group.",
269269
metadata: [
270270
self.loggingConfiguration.keys.serviceKey: "\(service.service)",
@@ -274,7 +274,7 @@ public actor ServiceGroup: Sendable {
274274
return .failure(ServiceGroupError.serviceFinishedUnexpectedly())
275275

276276
case .gracefullyShutdownGroup:
277-
self.logger.error(
277+
self.logger.debug(
278278
"Service finished. Gracefully shutting down group.",
279279
metadata: [
280280
self.loggingConfiguration.keys.serviceKey: "\(service.service)",
@@ -312,7 +312,7 @@ public actor ServiceGroup: Sendable {
312312
case .serviceThrew(let service, let index, let error):
313313
switch service.failureTerminationBehavior.behavior {
314314
case .cancelGroup:
315-
self.logger.error(
315+
self.logger.debug(
316316
"Service threw error. Cancelling group.",
317317
metadata: [
318318
self.loggingConfiguration.keys.serviceKey: "\(service.service)",
@@ -323,7 +323,7 @@ public actor ServiceGroup: Sendable {
323323
return .failure(error)
324324

325325
case .gracefullyShutdownGroup:
326-
self.logger.error(
326+
self.logger.debug(
327327
"Service threw error. Shutting down group.",
328328
metadata: [
329329
self.loggingConfiguration.keys.serviceKey: "\(service.service)",
@@ -489,7 +489,7 @@ public actor ServiceGroup: Sendable {
489489
case .serviceThrew(let service, _, let error):
490490
switch service.failureTerminationBehavior.behavior {
491491
case .cancelGroup:
492-
self.logger.error(
492+
self.logger.debug(
493493
"Service threw error during graceful shutdown. Cancelling group.",
494494
metadata: [
495495
self.loggingConfiguration.keys.serviceKey: "\(service.service)",

0 commit comments

Comments
 (0)