I'm using juju/logger in my Golang application for logging. I have configured the logger to log error,info and trace example:
filelog.go
-----------
func (obj fileLog) Infof(format string, args ...interface{}) {
log.logger.Infof(format, args)
}
and when called, the logger file actually shows the line number of filelog.go
where the logger is defined and not the actual location where the logger is called. I'm calling filelog
as
log.Logger().Infof("Invalid data passed" + err.Error())
Is there any param to be configured to log the line number of the actual caller function? Please help.