cmd: fix inconsistent logging for binaries

This commit is contained in:
George Tankersley
2018-12-11 03:37:42 -05:00
parent 0680706bdf
commit f0c2405593
3 changed files with 62 additions and 69 deletions

View File

@@ -52,7 +52,7 @@ func main() {
if opts.logPath != "" {
// instead write parsable logs for logstash/splunk/etc
output, err := os.Open(opts.logPath)
output, err := os.OpenFile(opts.logPath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
log.WithFields(logrus.Fields{
"error": err,