Skip to content

Commit

Permalink
Add log file setter to log config
Browse files Browse the repository at this point in the history
  • Loading branch information
timj-hh committed Dec 1, 2023
1 parent 6e0c160 commit 1718a59
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ecs-agent/logger/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,13 @@ func setInstanceLevelDefault() string {
return DEFAULT_LOGLEVEL
}

func SetConfigLogFile() {
Config.lock.Lock()
defer Config.lock.Unlock()

Config.logfile = os.Getenv(LOGFILE_ENV_VAR)
}

func init() {
Config = &logConfig{
logfile: os.Getenv(LOGFILE_ENV_VAR),
Expand Down

0 comments on commit 1718a59

Please sign in to comment.