diff options
author | Derrick Anderson <derrick@andersonwebstudio.com> | 2018-04-17 09:21:33 -0400 |
---|---|---|
committer | Derrick Anderson <derrick@andersonwebstudio.com> | 2018-04-17 09:21:33 -0400 |
commit | 885b8e51f3c0b0a4d98814b43917670c2193b3a4 (patch) | |
tree | e68563c27267d1d493e016f6846531bc033f698e /app/app.go | |
parent | 997df03ac1455785b7a39e40edcd67b3b3e86f9e (diff) | |
parent | 3176e13b1f9b14192bef2337ff3fb9346f26ef66 (diff) | |
download | chat-885b8e51f3c0b0a4d98814b43917670c2193b3a4.tar.gz chat-885b8e51f3c0b0a4d98814b43917670c2193b3a4.tar.bz2 chat-885b8e51f3c0b0a4d98814b43917670c2193b3a4.zip |
Merge remote-tracking branch 'origin/release-4.9' into merge49final
Diffstat (limited to 'app/app.go')
-rw-r--r-- | app/app.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/app.go b/app/app.go index 43f598f79..51ee37cbd 100644 --- a/app/app.go +++ b/app/app.go @@ -126,7 +126,14 @@ func New(options ...Option) (outApp *App, outErr error) { } } model.AppErrorInit(utils.T) + + // The first time we load config, clear any existing filters to allow the configuration + // changes to take effect. This is safe only because no one else is logging at this point. + l4g.Close() + if err := app.LoadConfig(app.configFile); err != nil { + // Re-initialize the default logger as we bail out. + l4g.Global = l4g.NewDefaultLogger(l4g.DEBUG) return nil, err } app.EnableConfigWatch() |