Added extra depth to logging to correctly show the functions calling the logger in logs
This commit is contained in:
parent
021ee48ec3
commit
ba7db545fe
1 changed files with 3 additions and 0 deletions
|
@ -50,6 +50,9 @@ func InitLogger() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This show correct caller functions
|
||||||
|
logInstance.ExtraCalldepth = 1
|
||||||
|
|
||||||
if config.LogErrors.GetString() == "file" || config.LogStandard.GetString() == "file" {
|
if config.LogErrors.GetString() == "file" || config.LogStandard.GetString() == "file" {
|
||||||
err := os.Mkdir(config.LogPath.GetString(), 0744)
|
err := os.Mkdir(config.LogPath.GetString(), 0744)
|
||||||
if err != nil && !os.IsExist(err) {
|
if err != nil && !os.IsExist(err) {
|
||||||
|
|
Loading…
Reference in a new issue