forked from mirror/logrus
Merge pull request #485 from mohanraj-r/patch-1
Add missing quotes around `user_ip` in example for "Default Fields"
This commit is contained in:
commit
79fbc614d9
|
@ -189,7 +189,7 @@ application or parts of one. For example, you may want to always log the
|
|||
every line, you can create a `logrus.Entry` to pass around instead:
|
||||
|
||||
```go
|
||||
requestLogger := log.WithFields(log.Fields{"request_id": request_id, user_ip: user_ip})
|
||||
requestLogger := log.WithFields(log.Fields{"request_id": request_id, "user_ip": user_ip})
|
||||
requestLogger.Info("something happened on that request") # will log request_id and user_ip
|
||||
requestLogger.Warn("something not great happened")
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue