main,log,errors: Option to disable log rotation ("rolling")

For log and errors directive, as well as process log.
This commit is contained in:
Matthew Holt
2019-01-28 10:28:06 -07:00
parent 23627bbf54
commit 930ca1cc1b
5 changed files with 44 additions and 19 deletions

View File

@@ -23,7 +23,7 @@ import (
"strings"
"sync"
"github.com/hashicorp/go-syslog"
gsyslog "github.com/hashicorp/go-syslog"
"github.com/mholt/caddy"
)
@@ -162,7 +162,7 @@ selectwriter:
return err
}
if l.Roller != nil {
if l.Roller != nil && !l.Roller.Disabled {
file.Close()
l.Roller.Filename = l.Output
l.writer = l.Roller.GetLogWriter()