Skip logging when logfile is unset (#6648)
This commit is contained in:
parent
58df6f6c94
commit
8cba5941be
|
@ -2,7 +2,6 @@ package logger
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"io"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
@ -112,7 +111,6 @@ func (t *telegrafLogCreator) CreateLogger(config LogConfig) (io.Writer, error) {
|
||||||
writer = defaultWriter
|
writer = defaultWriter
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log.Print("E! Empty logfile, using stderr")
|
|
||||||
writer = defaultWriter
|
writer = defaultWriter
|
||||||
}
|
}
|
||||||
case LogTargetStderr, "":
|
case LogTargetStderr, "":
|
||||||
|
|
Loading…
Reference in New Issue