Change the log flags to be a variable that can be set prior to calling Run (#6546)
Signed-off-by: Jeffrey Damick <jdamick@amazon.com> Co-authored-by: Jeffrey Damick <jdamick@amazon.com>
This commit is contained in:
parent
5a1995c808
commit
24c64f97c9
1 changed files with 4 additions and 1 deletions
|
@ -45,7 +45,7 @@ func Run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
log.SetOutput(os.Stdout)
|
log.SetOutput(os.Stdout)
|
||||||
log.SetFlags(0) // Set to 0 because we're doing our own time, with timezone
|
log.SetFlags(LogFlags)
|
||||||
|
|
||||||
if version {
|
if version {
|
||||||
showVersion()
|
showVersion()
|
||||||
|
@ -169,6 +169,9 @@ var (
|
||||||
conf string
|
conf string
|
||||||
version bool
|
version bool
|
||||||
plugins bool
|
plugins bool
|
||||||
|
|
||||||
|
// LogFlags are initially set to 0 for no extra output
|
||||||
|
LogFlags int
|
||||||
)
|
)
|
||||||
|
|
||||||
// Build information obtained with the help of -ldflags
|
// Build information obtained with the help of -ldflags
|
||||||
|
|
Loading…
Add table
Reference in a new issue