File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,8 +31,13 @@ import (
3131)
3232
3333const (
34- EnvLogFile = "ELASTIC_APM_LOG_FILE"
35- EnvLogLevel = "ELASTIC_APM_LOG_LEVEL"
34+ // EnvLogFile is the environment variable that controls where the default logger writes.
35+ EnvLogFile = "ELASTIC_APM_LOG_FILE"
36+
37+ // EnvLogLevel is the environment variable that controls the default logger's level.
38+ EnvLogLevel = "ELASTIC_APM_LOG_LEVEL"
39+
40+ // DefaultLevel holds the default log level, if EnvLogLevel is not specified.
3641 DefaultLevel Level = ErrorLevel
3742)
3843
@@ -87,6 +92,7 @@ func InitDefaultLogger() {
8792 DefaultLogger = & LevelLogger {w : logWriter , level : logLevel }
8893}
8994
95+ // Log levels.
9096const (
9197 DebugLevel Level = iota
9298 InfoLevel
@@ -96,6 +102,7 @@ const (
96102 OffLevel
97103)
98104
105+ // Level represents a log level.
99106type Level uint32
100107
101108func (l Level ) String () string {
You can’t perform that action at this time.
0 commit comments