Fix example
This commit is contained in:
@@ -3,6 +3,27 @@
|
||||
Logrus is a simple, opinionated structured logging package for Go which is
|
||||
completely API compatible with the standard library logger.
|
||||
|
||||
Nicely color-coded in development (when a TTY is attached):
|
||||
|
||||
[Imgur](http://i.imgur.com/PY7qMwd.png)
|
||||
|
||||
With `log.Formatter = new(logrus.JSONFormatter)`:
|
||||
|
||||
```json
|
||||
{"animal":"walrus","level":"info","msg":"A group of walrus emerges from the
|
||||
ocean","size":"10","time":"2014-03-10 19:57:38.562264131 -0400 EDT"}
|
||||
{"level":"warning","msg":"The group's number increased
|
||||
tremendously!","number":122,"omg":true,"time":"2014-03-10 19:57:38.562471297
|
||||
-0400 EDT"}
|
||||
{"animal":"walrus","level":"info","msg":"A giant walrus
|
||||
appears!","size":"10","time":"2014-03-10 19:57:38.562500591 -0400 EDT"}
|
||||
{"animal":"walrus","level":"info","msg":"Tremendously sized cow enters the
|
||||
ocean.","size":"9","time":"2014-03-10 19:57:38.562527896 -0400 EDT"}
|
||||
{"level":"fatal","msg":"The ice
|
||||
breaks!","number":100,"omg":true,"time":"2014-03-10 19:57:38.562543128 -0400
|
||||
EDT"}
|
||||
```
|
||||
|
||||
#### Fields
|
||||
|
||||
Logrus encourages careful, structured logging. It encourages the use of logging
|
||||
|
||||
Reference in New Issue
Block a user