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
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

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) {