logging: Tweak defaults (enable logging by default, color level enc.)

This commit is contained in:
Matthew Holt
2019-10-29 11:58:29 -06:00
parent 54e458b756
commit c4c45f8e01
2 changed files with 7 additions and 5 deletions

View File

@ -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