Skip to content

Only log at debug levels #151

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

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Sources/ServiceLifecycle/ServiceGroup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public actor ServiceGroup: Sendable {

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

case .gracefullyShutdownGroup:
self.logger.error(
self.logger.debug(
"Service finished. Gracefully shutting down group.",
metadata: [
self.loggingConfiguration.keys.serviceKey: "\(service.service)",
Expand Down Expand Up @@ -312,7 +312,7 @@ public actor ServiceGroup: Sendable {
case .serviceThrew(let service, let index, let error):
switch service.failureTerminationBehavior.behavior {
case .cancelGroup:
self.logger.error(
self.logger.debug(
"Service threw error. Cancelling group.",
metadata: [
self.loggingConfiguration.keys.serviceKey: "\(service.service)",
Expand All @@ -323,7 +323,7 @@ public actor ServiceGroup: Sendable {
return .failure(error)

case .gracefullyShutdownGroup:
self.logger.error(
self.logger.debug(
"Service threw error. Shutting down group.",
metadata: [
self.loggingConfiguration.keys.serviceKey: "\(service.service)",
Expand Down Expand Up @@ -489,7 +489,7 @@ public actor ServiceGroup: Sendable {
case .serviceThrew(let service, _, let error):
switch service.failureTerminationBehavior.behavior {
case .cancelGroup:
self.logger.error(
self.logger.debug(
"Service threw error during graceful shutdown. Cancelling group.",
metadata: [
self.loggingConfiguration.keys.serviceKey: "\(service.service)",
Expand Down