From a557f452a7f2f72ce8ce3c893cd11c39d5f9a226 Mon Sep 17 00:00:00 2001 From: Oskar Date: Thu, 21 Oct 2021 23:18:24 +0200 Subject: [PATCH] feat(log): SetReportCaller to true example output: INFO[0000]/home/trex/go/src/awesomeProject/main.go:11 main.main() hello world from https://stackoverflow.com/a/68301267 --- common/log.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/log.go b/common/log.go index c565671..fc63286 100644 --- a/common/log.go +++ b/common/log.go @@ -25,3 +25,7 @@ var Log = &logrus.Logger{ Hooks: make(logrus.LevelHooks), Level: logrus.InfoLevel, } + +func init() { + Log.SetReportCaller(true) +}