diff --git a/generator/services.go b/generator/services.go index 3cbc6ce..e8a889c 100644 --- a/generator/services.go +++ b/generator/services.go @@ -91,7 +91,7 @@ func (g *CaddyfileGenerator) getServiceTasksIps(service *swarm.Service, logger * } if !hasRunningTasks { - logger.Warn("Service has no tasks in running state", zap.String("service", service.Spec.Name), zap.String("serviceId", service.ID)) + logger.Debug("Service has no tasks in running state", zap.String("service", service.Spec.Name), zap.String("serviceId", service.ID)) } else if len(tasksIps) == 0 { logger.Warn("Service is not in same network as caddy", zap.String("service", service.Spec.Name), zap.String("serviceId", service.ID)) diff --git a/generator/services_test.go b/generator/services_test.go index a14efd9..473cfbf 100644 --- a/generator/services_test.go +++ b/generator/services_test.go @@ -203,8 +203,7 @@ func TestServiceTasks_Empty(t *testing.T) { " reverse_proxy\n" + "}\n" - const expectedLogs = commonLogs + - `WARN Service has no tasks in running state {"service": "service", "serviceId": "SERVICEID"}` + newLine + const expectedLogs = commonLogs testGeneration(t, dockerClient, func(options *config.Options) { options.ProxyServiceTasks = true @@ -267,8 +266,7 @@ func TestServiceTasks_NotRunning(t *testing.T) { " reverse_proxy\n" + "}\n" - const expectedLogs = commonLogs + - `WARN Service has no tasks in running state {"service": "service", "serviceId": "SERVICEID"}` + newLine + const expectedLogs = commonLogs testGeneration(t, dockerClient, func(options *config.Options) { options.ProxyServiceTasks = true