From d8b75b445a45ac32952f9c1439a249c75a668f81 Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Fri, 8 Jun 2018 15:35:56 +0300 Subject: [PATCH] log: automatically add 2 (skipLevel) to the step in log.Output --- log/root.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/log/root.go b/log/root.go index 0682316389..486c54861f 100644 --- a/log/root.go +++ b/log/root.go @@ -60,7 +60,8 @@ func Crit(msg string, ctx ...interface{}) { os.Exit(1) } -// Output is a convenient alias for write +// Output is a convenient alias for write, allowing for the modification of +// the skip step (number of stack frames to skip) func Output(msg string, lvl Lvl, skip int, ctx ...interface{}) { - root.write(msg, lvl, ctx, skip) + root.write(msg, lvl, ctx, skip+skipLevel) }