From 9a0c9801d6cdfd9bb91b4865da0e4c238c115a8a Mon Sep 17 00:00:00 2001 From: Antoine Grondin Date: Wed, 23 Jul 2014 16:48:53 -0400 Subject: [PATCH] Add readme paragraph about package exported funcs. --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0501a4c..0c1d6ac 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,13 @@ func main() { } ``` +#### Package logging + +Alike the stdlib logger, logrus exposes functions that you can use to log +to a default global logger. This is convenient to avoid passing a +`logrus.Logger` thorough your app's packages; you can simply setup `logrus +from your main package and use the package function directly accross your app. + #### Fields Logrus encourages careful, structured logging though logging fields instead of @@ -91,7 +98,7 @@ log = logrus.New() log.WithFields(logrus.Fields{ "event": event, "topic": topic, - "key": key + "key": key, }).Fatal("Failed to send event") ```