From 802fba19a4dcbcabe24af1b67e0db5d5de175f04 Mon Sep 17 00:00:00 2001 From: Dave Clendenan Date: Fri, 2 Dec 2016 09:52:11 -0800 Subject: [PATCH] add note on caller-reporting overhead to README --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 30402b6..083fcdc 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,12 @@ This adds the caller as 'method' like so: time="2015-03-26T01:27:38-04:00" level=fatal method=arcticcreatures.migrate msg="a penguin swims by" animal=penguin ``` +Note that this does add measurable overhead - the cost will depend on the of Go, but is between 20 and 40% in recent tests with 1.6 and 1.7. You can validate this in your environment via benchmarks: +``` +go test -bench=.*CallerTracing +``` + + #### Example The simplest way to use Logrus is simply the package-level exported logger: