From 4e2e909add00ff1374edae87d653dfbdbc73fdb4 Mon Sep 17 00:00:00 2001 From: Andrew Wilkins Date: Thu, 10 Dec 2020 15:42:12 +0800 Subject: [PATCH] internal/apmlog: fix lint issues --- internal/apmlog/logger.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/internal/apmlog/logger.go b/internal/apmlog/logger.go index c221c4523..fae24934f 100644 --- a/internal/apmlog/logger.go +++ b/internal/apmlog/logger.go @@ -31,8 +31,13 @@ import ( ) const ( - EnvLogFile = "ELASTIC_APM_LOG_FILE" - EnvLogLevel = "ELASTIC_APM_LOG_LEVEL" + // EnvLogFile is the environment variable that controls where the default logger writes. + EnvLogFile = "ELASTIC_APM_LOG_FILE" + + // EnvLogLevel is the environment variable that controls the default logger's level. + EnvLogLevel = "ELASTIC_APM_LOG_LEVEL" + + // DefaultLevel holds the default log level, if EnvLogLevel is not specified. DefaultLevel Level = ErrorLevel ) @@ -87,6 +92,7 @@ func InitDefaultLogger() { DefaultLogger = &LevelLogger{w: logWriter, level: logLevel} } +// Log levels. const ( DebugLevel Level = iota InfoLevel @@ -96,6 +102,7 @@ const ( OffLevel ) +// Level represents a log level. type Level uint32 func (l Level) String() string {