Skip to content

Commit

Permalink
Creating a text/json writer wrapping over standard output logging wri…
Browse files Browse the repository at this point in the history
…ter (#1056)
  • Loading branch information
raj-prince committed Apr 11, 2023
1 parent d97394e commit 4b25949
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ func (f *loggerFactory) writer(level string) io.Writer {

switch level {
case "NOTICE":
return daemonize.StatusWriter
return f.createJsonOrTextWriter(level, daemonize.StatusWriter)
case "ERROR":
return os.Stderr
return f.createJsonOrTextWriter(level, os.Stderr)
default:
return os.Stdout
return f.createJsonOrTextWriter(level, os.Stdout)
}
}

0 comments on commit 4b25949

Please sign in to comment.