readme: add setting level instructions
This commit is contained in:
@@ -71,6 +71,7 @@ for the environment.
|
||||
Logrus has six levels: Debug, Info, Warning, Error, Fatal and Panic.
|
||||
|
||||
```go
|
||||
log.Debug("Useful debugging information.")
|
||||
log.Info("Something noteworthy happened!")
|
||||
log.Warn("You should probably take a look at this.")
|
||||
log.Error("Something failed but I'm not quitting.")
|
||||
@@ -78,6 +79,13 @@ log.Fatal("Bye.")
|
||||
log.Panic("I'm bailing.")
|
||||
```
|
||||
|
||||
You can set the logging level:
|
||||
|
||||
```go
|
||||
// Will log anything that is info or above, default.
|
||||
logrus.Level = LevelInfo
|
||||
```
|
||||
|
||||
#### Entries
|
||||
|
||||
Besides the fields added with `WithField` or `WithFields` some fields are
|
||||
|
||||
Reference in New Issue
Block a user