diff options
author | Chris <ccbrown112@gmail.com> | 2017-10-30 11:58:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-30 11:58:00 -0500 |
commit | 3cbacb6858ea2dda67719de64854ed30dea3b626 (patch) | |
tree | 8d0177242e65c809250fa73bd93faae26bd1ca10 /utils/logger/logger.go | |
parent | c5e8cb25caa39ed018ede5270e1566e8f7448396 (diff) | |
download | chat-3cbacb6858ea2dda67719de64854ed30dea3b626.tar.gz chat-3cbacb6858ea2dda67719de64854ed30dea3b626.tar.bz2 chat-3cbacb6858ea2dda67719de64854ed30dea3b626.zip |
Remove unused variables / code (#7736)
* remove unused variables / code
* fix bug in testPostStoreGetOldest
Diffstat (limited to 'utils/logger/logger.go')
-rw-r--r-- | utils/logger/logger.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/utils/logger/logger.go b/utils/logger/logger.go index 410a5a5fc..da549dcc4 100644 --- a/utils/logger/logger.go +++ b/utils/logger/logger.go @@ -28,15 +28,14 @@ var infoLog = l4g.Info var errorLog = l4g.Error func init() { + // listens for configuration changes that we might need to respond to + utils.AddConfigListener(func(oldConfig *model.Config, newConfig *model.Config) { + infoLog("Configuration change detected, reloading log settings") + initL4g(newConfig.LogSettings) + }) initL4g(utils.Cfg.LogSettings) } -// listens for configuration changes that we might need to respond to -var configListenerID = utils.AddConfigListener(func(oldConfig *model.Config, newConfig *model.Config) { - infoLog("Configuration change detected, reloading log settings") - initL4g(newConfig.LogSettings) -}) - // assumes that ../config.go::configureLog has already been called, and has in turn called l4g.close() to clean up // any old filters that we might have previously created func initL4g(logSettings model.LogSettings) { |