Skip to content

logrus utilities like contextual logging and error fields

License

Notifications You must be signed in to change notification settings

go-logrusutil/logrusutil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logrusutil 🔨 GoDoc Build Status Go Report Card golangci

Small, easy to use, yet powerful utility packages for logrus.

logctx package GoDoc

Add a log entry to the context using logctx.New(ctx, logEntry) or simply add a new log field using logctx.AddField(ctx, key, value). Retrieve the log entry using logctx.From(ctx).

Read more.

errfield package GoDoc

Wrap an error with fields using errfield.Add(err, "key", value). Use errfield.Formatter to log the fields in a structured way.

Read more.

Check the sample HTTP server application and its Step by step guide, to see logrusutil in action.