summaryrefslogtreecommitdiff
path: root/caddy.go
diff options
context:
space:
mode:
Diffstat (limited to 'caddy.go')
-rw-r--r--caddy.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/caddy.go b/caddy.go
index dd241ee..33e6296 100644
--- a/caddy.go
+++ b/caddy.go
@@ -119,11 +119,12 @@ func run(newCfg *Config, start bool) error {
newCfg.cancelFunc = cancel // clean up later
// set up logging before anything bad happens
- if newCfg.Logging != nil {
- err := newCfg.Logging.openLogs(ctx)
- if err != nil {
- return err
- }
+ if newCfg.Logging == nil {
+ newCfg.Logging = new(Logging)
+ }
+ err = newCfg.Logging.openLogs(ctx)
+ if err != nil {
+ return err
}
// set up global storage and make it CertMagic's default storage, too