diff options
Diffstat (limited to 'vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go')
-rw-r--r-- | vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go b/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go index 5951fd06d..293c08961 100644 --- a/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go +++ b/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go @@ -24,7 +24,7 @@ import ( "github.com/go-logr/stdr" ) -// globalLogger is the logging interface used within the otel api and sdk provide details of the internals. +// globalLogger is the logging interface used within the otel api and sdk provide deatails of the internals. // // The default logger uses stdr which is backed by the standard `log.Logger` // interface. This logger will only show messages at the Error Level. @@ -36,9 +36,8 @@ func init() { // SetLogger overrides the globalLogger with l. // -// To see Warn messages use a logger with `l.V(1).Enabled() == true` -// To see Info messages use a logger with `l.V(4).Enabled() == true` -// To see Debug messages use a logger with `l.V(8).Enabled() == true`. +// To see Info messages use a logger with `l.V(1).Enabled() == true` +// To see Debug messages use a logger with `l.V(5).Enabled() == true`. func SetLogger(l logr.Logger) { atomic.StorePointer(&globalLogger, unsafe.Pointer(&l)) } @@ -48,9 +47,9 @@ func getLogger() logr.Logger { } // Info prints messages about the general state of the API or SDK. -// This should usually be less than 5 messages a minute. +// This should usually be less then 5 messages a minute. func Info(msg string, keysAndValues ...interface{}) { - getLogger().V(4).Info(msg, keysAndValues...) + getLogger().V(1).Info(msg, keysAndValues...) } // Error prints messages about exceptional states of the API or SDK. @@ -60,11 +59,5 @@ func Error(err error, msg string, keysAndValues ...interface{}) { // Debug prints messages about all internal changes in the API or SDK. func Debug(msg string, keysAndValues ...interface{}) { - getLogger().V(8).Info(msg, keysAndValues...) -} - -// Warn prints messages about warnings in the API or SDK. -// Not an error but is likely more important than an informational event. -func Warn(msg string, keysAndValues ...interface{}) { - getLogger().V(1).Info(msg, keysAndValues...) + getLogger().V(5).Info(msg, keysAndValues...) } |