From 4017920403cd7e30593a6a8b044b10930910eccb Mon Sep 17 00:00:00 2001 From: Alex Boten <223565+codeboten@users.noreply.github.com> Date: Wed, 17 Jul 2024 13:33:53 -0700 Subject: [PATCH] log the name of the state The int value of the state is not super helpful to end users. Logging the name of the state instead. Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> --- collector/internal/collector/collector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collector/internal/collector/collector.go b/collector/internal/collector/collector.go index 6c511ff32d..76da891f13 100644 --- a/collector/internal/collector/collector.go +++ b/collector/internal/collector/collector.go @@ -126,7 +126,7 @@ func (c *Collector) Start(ctx context.Context) error { case otelcol.StateRunning: return nil default: - err = fmt.Errorf("unable to start, otelcol state is %d", state) + err = fmt.Errorf("unable to start, otelcol state is %s", state.String()) } } }