Added extra depth to logging to correctly show the functions calling the logger in logs

This commit is contained in:
kolaente 2019-09-01 17:56:22 +02:00
parent 021ee48ec3
commit ba7db545fe
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 3 additions and 0 deletions

View File

@ -50,6 +50,9 @@ func InitLogger() {
return
}
// This show correct caller functions
logInstance.ExtraCalldepth = 1
if config.LogErrors.GetString() == "file" || config.LogStandard.GetString() == "file" {
err := os.Mkdir(config.LogPath.GetString(), 0744)
if err != nil && !os.IsExist(err) {