Default to CLF when accesslog format is unsupported
This commit is contained in:
parent
d044c0f4cc
commit
605a9b2817
2 changed files with 3 additions and 3 deletions
|
@ -77,7 +77,8 @@ func NewHandler(config *types.AccessLog) (*Handler, error) {
|
|||
case JSONFormat:
|
||||
formatter = new(logrus.JSONFormatter)
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported access log format: %s", config.Format)
|
||||
log.WithoutContext().Errorf("unsupported access log format: %q, defaulting to common format instead.", config.Format)
|
||||
formatter = new(CommonLogFormatter)
|
||||
}
|
||||
|
||||
logger := &logrus.Logger{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue