From 0d22ee4d71687885404a90fc0aab605f38871f48 Mon Sep 17 00:00:00 2001 From: Nicholas Wiersma Date: Tue, 21 May 2024 13:50:56 +0200 Subject: [PATCH] fix: move pyroscope debug to trace (#259) --- go.mod | 2 +- go.sum | 4 ++-- log.go | 2 +- profile.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 89cfc31..c789062 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/fatih/color v1.17.0 github.com/grafana/otel-profiling-go v0.5.1 github.com/grafana/pyroscope-go v1.1.1 - github.com/hamba/logger/v2 v2.5.1 + github.com/hamba/logger/v2 v2.6.0 github.com/hamba/statter/v2 v2.3.5 github.com/stretchr/testify v1.9.0 github.com/urfave/cli/v2 v2.27.2 diff --git a/go.sum b/go.sum index 3959054..cd695ba 100644 --- a/go.sum +++ b/go.sum @@ -33,8 +33,8 @@ github.com/grafana/pyroscope-go/godeltaprof v0.1.6 h1:nEdZ8louGAplSvIJi1HVp7kWvF github.com/grafana/pyroscope-go/godeltaprof v0.1.6/go.mod h1:Tk376Nbldo4Cha9RgiU7ik8WKFkNpfds98aUzS8omLE= github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= -github.com/hamba/logger/v2 v2.5.1 h1:EM+S6CPYIs66XmW9kK/RBghgtkLcO4kQWWPAlsIwNR4= -github.com/hamba/logger/v2 v2.5.1/go.mod h1:b+y7XddZMTTSIjKdOOIHWlhg1hMoE9eKhanB9wPNLj0= +github.com/hamba/logger/v2 v2.6.0 h1:73CPbhY5luRzITKeX8hhdL4K3jezsH8cyTYgcOl7JeA= +github.com/hamba/logger/v2 v2.6.0/go.mod h1:JEikfAmI6C/vaSE8MSb4SXTgWclNSN6tmdyyLv3/ATA= github.com/hamba/statter/v2 v2.3.5 h1:qAFu+n4Q08LtrBdcBYexItfOoJJ16D/m/boq8fm5hn4= github.com/hamba/statter/v2 v2.3.5/go.mod h1:LS7DqETxoVpRraL3tn9O70zYCaVRL2A98SvZw/LZkAI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= diff --git a/log.go b/log.go index bffb8fb..eb49609 100644 --- a/log.go +++ b/log.go @@ -25,7 +25,7 @@ var LogFlags = Flags{ &cli.StringFlag{ Name: FlagLogLevel, Value: "info", - Usage: "Specify the log level. e.g. 'debug', 'info', 'error'.", + Usage: "Specify the log level. e.g. 'trace', 'debug', 'info', 'error'.", EnvVars: []string{"LOG_LEVEL"}, }, &cli.StringSliceFlag{ diff --git a/profile.go b/profile.go index f836687..d39a475 100644 --- a/profile.go +++ b/profile.go @@ -131,7 +131,7 @@ func (a pyroLogAdapter) Infof(format string, args ...any) { } func (a pyroLogAdapter) Debugf(format string, args ...any) { - a.log.Debug(fmt.Sprintf(format, args...)) + a.log.Trace(fmt.Sprintf(format, args...)) } func (a pyroLogAdapter) Errorf(format string, args ...any) {