From 0d24ba12bb85078afd8c821bae61926fd81f163e Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 28 Jan 2024 13:36:13 +0100 Subject: [PATCH] chore: rename function --- pkg/config/config.go | 4 ++-- pkg/log/logging.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index f345869a6..faf5df7db 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -411,7 +411,7 @@ func InitConfig() { // Just load environment variables _ = viper.ReadInConfig() - log.ConfigLogger(LogEnabled.GetBool(), LogStandard.GetString(), LogPath.GetString(), LogLevel.GetString()) + log.ConfigureLogger(LogEnabled.GetBool(), LogStandard.GetString(), LogPath.GetString(), LogLevel.GetString()) // Load the config file viper.AddConfigPath(ServiceRootpath.GetString()) @@ -436,7 +436,7 @@ func InitConfig() { log.Warning(err.Error()) log.Warning("Using default config.") } else { - log.ConfigLogger(LogEnabled.GetBool(), LogStandard.GetString(), LogPath.GetString(), LogLevel.GetString()) + log.ConfigureLogger(LogEnabled.GetBool(), LogStandard.GetString(), LogPath.GetString(), LogLevel.GetString()) } } else { log.Info("No config file found, using default or config from environment variables.") diff --git a/pkg/log/logging.go b/pkg/log/logging.go index 66971f4ef..901c2469a 100644 --- a/pkg/log/logging.go +++ b/pkg/log/logging.go @@ -40,7 +40,7 @@ const logModule = `vikunja` var logInstance = logging.MustGetLogger(logModule) // 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 +// This value is a mere fallback for other modules that could but shouldn't be used before calling ConfigureLogger var logPath = "." // InitLogger initializes the global log handler @@ -58,8 +58,8 @@ func InitLogger() { logInstance.SetBackend(backendLeveled) } -// ConfigLogger configures the global log handler -func ConfigLogger(configLogEnabled bool, configLogStandard string, configLogPath string, configLogLevel string) { +// ConfigureLogger configures the global log handler +func ConfigureLogger(configLogEnabled bool, configLogStandard string, configLogPath string, configLogLevel string) { lvl := strings.ToUpper(configLogLevel) level, err := logging.LogLevel(lvl) if err != nil {