Skip to content

Commit

Permalink
Merge pull request #1109 from influxdb/fix-947
Browse files Browse the repository at this point in the history
Fix #947: exit nice if no permission to write log
  • Loading branch information
toddboom committed Nov 14, 2014
2 parents 6b58826 + 6842625 commit 667b5d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions daemon/influxd.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ func setupLogging(loggingLevel, logFile string) {
os.MkdirAll(logFileDir, 0744)

flw := log.NewFileLogWriter(logFile, false)
if flw == nil {
os.Exit(1)
}
log.AddFilter("file", level, flw)

flw.SetFormat("[%D %T] [%L] (%S) %M")
Expand Down

0 comments on commit 667b5d3

Please sign in to comment.