aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jdamick <jeffreydamick@gmail.com> 2024-03-13 09:43:06 -0400
committerGravatar GitHub <noreply@github.com> 2024-03-13 09:43:06 -0400
commit24c64f97c90b68b8d0e8221af3b7741d652ced1d (patch)
tree513499eb95a84e4ffb1985396418ae58c81363cb
parent5a1995c808265bd0d15f8ee81afb76abb834536f (diff)
downloadcoredns-24c64f97c90b68b8d0e8221af3b7741d652ced1d.tar.gz
coredns-24c64f97c90b68b8d0e8221af3b7741d652ced1d.tar.zst
coredns-24c64f97c90b68b8d0e8221af3b7741d652ced1d.zip
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>
-rw-r--r--coremain/run.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/coremain/run.go b/coremain/run.go
index 6604a4edc..31b791c8e 100644
--- a/coremain/run.go
+++ b/coremain/run.go
@@ -45,7 +45,7 @@ func Run() {
}
log.SetOutput(os.Stdout)
- log.SetFlags(0) // Set to 0 because we're doing our own time, with timezone
+ log.SetFlags(LogFlags)
if version {
showVersion()
@@ -169,6 +169,9 @@ var (
conf string
version bool
plugins bool
+
+ // LogFlags are initially set to 0 for no extra output
+ LogFlags int
)
// Build information obtained with the help of -ldflags