Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

update netdata log level env var #1428

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions cmd/godplugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ import (
)

var (
cd, _ = os.Getwd()
name = "go.d"
userDir = os.Getenv("NETDATA_USER_CONFIG_DIR")
stockDir = os.Getenv("NETDATA_STOCK_CONFIG_DIR")
varLibDir = os.Getenv("NETDATA_LIB_DIR")
lockDir = os.Getenv("NETDATA_LOCK_DIR")
watchPath = os.Getenv("NETDATA_PLUGINS_GOD_WATCH_PATH")
envLogLevelLevel = os.Getenv("NETDATA_LOG_SEVERITY_LEVEL")
cd, _ = os.Getwd()
name = "go.d"
userDir = os.Getenv("NETDATA_USER_CONFIG_DIR")
stockDir = os.Getenv("NETDATA_STOCK_CONFIG_DIR")
varLibDir = os.Getenv("NETDATA_LIB_DIR")
lockDir = os.Getenv("NETDATA_LOCK_DIR")
watchPath = os.Getenv("NETDATA_PLUGINS_GOD_WATCH_PATH")
envLogLevel = os.Getenv("NETDATA_LOG_LEVEL")

version = "unknown"
)
Expand Down Expand Up @@ -98,8 +98,8 @@ func main() {
return
}

if envLogLevelLevel != "" {
logger.Level.SetByName(envLogLevelLevel)
if envLogLevel != "" {
logger.Level.SetByName(envLogLevel)
}

if opts.Debug {
Expand Down
Loading