Skip to content

Commit

Permalink
Add logFile=stdout support
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed Sep 24, 2024
1 parent b95b272 commit 117960f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ func Server(config string, port, metricsPort int, logFile string, useX509, scito
log.SetOutput(new(logging.LogWriter))
if logFile != "" {
log.Println("overwrite server log file to", logFile)
Config.LogFile = logFile
if logFile == "stdout" {
Config.LogFile = ""
} else {
Config.LogFile = logFile
}
}
if Config.LogFile != "" {
rl, err := rotatelogs.New(LogName())
Expand Down

0 comments on commit 117960f

Please sign in to comment.