nmdc-log-service: fix opening files on linux
This commit is contained in:
parent
108b04acab
commit
0394f131be
2
main.go
2
main.go
@ -37,7 +37,7 @@ func LogMessage(hub, message string) {
|
||||
// Produce a timestamp
|
||||
timeStamp := instant.Format("2006-01-02 15:04:05")
|
||||
|
||||
fh, err := os.OpenFile(logFilePath, os.O_APPEND|os.O_CREATE, 0644)
|
||||
fh, err := os.OpenFile(logFilePath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Couldn't open file '%s': %s\n", logFilePath, err.Error())
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user