forked from vikunja/vikunja
Compare commits
2 Commits
e5ebc6ede6
...
61f0f65bf1
Author | SHA1 | Date | |
---|---|---|---|
|
61f0f65bf1 | ||
|
fcc502edcf |
|
@ -419,7 +419,6 @@ func InitConfig() {
|
|||
viper.SetConfigName("config")
|
||||
|
||||
err = viper.ReadInConfig()
|
||||
log.ConfigLogger(LogEnabled.GetBool(), LogStandard.GetString(), LogPath.GetString(), LogLevel.GetString())
|
||||
|
||||
if viper.ConfigFileUsed() != "" {
|
||||
log.Infof("Using config file: %s", viper.ConfigFileUsed())
|
||||
|
@ -427,6 +426,8 @@ func InitConfig() {
|
|||
if err != nil {
|
||||
log.Warning(err.Error())
|
||||
log.Warning("Using default config.")
|
||||
} else {
|
||||
log.ConfigLogger(LogEnabled.GetBool(), LogStandard.GetString(), LogPath.GetString(), LogLevel.GetString())
|
||||
}
|
||||
} else {
|
||||
log.Info("No config file found, using default or config from environment variables.")
|
||||
|
|
|
@ -39,7 +39,8 @@ const logModule = `vikunja`
|
|||
// loginstance is the instance of the logger which is used under the hood to log
|
||||
var logInstance = logging.MustGetLogger(logModule)
|
||||
|
||||
// logpath is the path in which log files will be written. This value should actually never be used
|
||||
// logpath is the path in which log files will be written.
|
||||
// This value is a mere fallback for other modules that could but shouldn't be used before calling ConfigLogger
|
||||
var logPath = "."
|
||||
|
||||
// InitLogger initializes the global log handler
|
||||
|
|
Loading…
Reference in New Issue
Block a user