nmdc-log-service: fix opening files on linux
This commit is contained in:
parent
3a67b02bd9
commit
b0e1c3e5d8
@ -37,7 +37,7 @@ func LogMessage(hub, message string) {
|
|||||||
// Produce a timestamp
|
// Produce a timestamp
|
||||||
timeStamp := instant.Format("2006-01-02 15:04:05")
|
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 {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "Couldn't open file '%s': %s\n", logFilePath, err.Error())
|
fmt.Fprintf(os.Stderr, "Couldn't open file '%s': %s\n", logFilePath, err.Error())
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user