From e155f76d1bb46189c582ab9eac6943b1cb8c023c Mon Sep 17 00:00:00 2001 From: Simon Eskildsen Date: Sat, 8 Mar 2014 10:55:15 -0500 Subject: [PATCH] readme: remove error --- README.md | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/README.md b/README.md index 232f74e..e56ca77 100644 --- a/README.md +++ b/README.md @@ -48,24 +48,6 @@ log.AddHook("error", func(entry logrus.Entry) { }) ``` -#### Errors - -You can also use Logrus to return errors with fields. For instance: - -```go -err := record.Destroy() -if err != nil { - return log.WithFields(&logrus.Fields{ - "id": record.Id, - "method": "destroy" - }).AsError("Failed to destroy record") -} -``` - -Will return a `logrus.Error` object. Passing it to -`log.{Info,Warn,Error,Fatal,Panic}` will log it according to the formatter set -for the environment. - #### Level logging Logrus has six levels: Debug, Info, Warning, Error, Fatal and Panic.