Log file directory

This commit is contained in:
Zorglube 2020-08-23 00:05:30 +02:00
parent 5fe3036e03
commit 99f48694ac
1 changed files with 3 additions and 1 deletions

View File

@ -85,7 +85,9 @@ func LoadSettings(filename string) (*Settings, error) {
}
s.filename = filename
if err = common.SetupLogging(s.LogLevel, s.LogFile); err != nil {
var logFileDir string = runPath() + "/" + s.LogFile
fmt.Printf("Log file: %s\n", logFileDir)
if err = common.SetupLogging(s.LogLevel, logFileDir); err != nil {
return nil, fmt.Errorf("Unable to setup logger: %s", err)
}