diff --git a/cmd/generate-config/main.go b/cmd/generate-config/main.go index 9f6ed18f0..6c3f9e66c 100644 --- a/cmd/generate-config/main.go +++ b/cmd/generate-config/main.go @@ -50,6 +50,15 @@ func main() { cfg.Global.DatabaseOptions.ConnectionString = config.DataSource(*dbURI) } } + cfg.Logging = []config.LogrusHook{ + { + Type: "file", + Level: "info", + Params: map[string]interface{}{ + "path": "/var/log/dendrite", + }, + }, + } if *defaultsForCI { cfg.AppServiceAPI.DisableTLSValidation = true cfg.ClientAPI.RateLimiting.Enabled = false diff --git a/setup/config/config.go b/setup/config/config.go index 7b9db7b54..ccab71d04 100644 --- a/setup/config/config.go +++ b/setup/config/config.go @@ -304,18 +304,6 @@ type DefaultOpts struct { func (c *Dendrite) Defaults(opts DefaultOpts) { c.Version = Version - if opts.Generate { - c.Logging = []LogrusHook{ - { - Type: "file", - Level: "info", - Params: map[string]interface{}{ - "path": "/var/log", - }, - }, - } - } - c.Global.Defaults(opts) c.ClientAPI.Defaults(opts) c.FederationAPI.Defaults(opts)