summaryrefslogtreecommitdiffstats
path: root/app/app.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/app.go')
-rw-r--r--app/app.go7
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()