mirror of https://github.com/sirupsen/logrus.git
Merge pull request #452 from cjellick/readme-update
Update readme example for switching output
This commit is contained in:
commit
d4158e8bbd
|
@ -87,8 +87,8 @@ func init() {
|
||||||
// Log as JSON instead of the default ASCII formatter.
|
// Log as JSON instead of the default ASCII formatter.
|
||||||
log.SetFormatter(&log.JSONFormatter{})
|
log.SetFormatter(&log.JSONFormatter{})
|
||||||
|
|
||||||
// Output to stderr instead of stdout, could also be a file.
|
// Output to stdout instead of the default stderr, could also be a file.
|
||||||
log.SetOutput(os.Stderr)
|
log.SetOutput(os.Stdout)
|
||||||
|
|
||||||
// Only log the warning severity or above.
|
// Only log the warning severity or above.
|
||||||
log.SetLevel(log.WarnLevel)
|
log.SetLevel(log.WarnLevel)
|
||||||
|
|
Loading…
Reference in New Issue