From 7769e38becba167fe004f046edf19b4937355ddd Mon Sep 17 00:00:00 2001 From: Simon Eskildsen Date: Thu, 6 Mar 2014 21:49:10 -0500 Subject: [PATCH] readme: add setting level instructions --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 416e1f6..ddd8642 100644 --- a/README.md +++ b/README.md @@ -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