summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2021-10-19 19:50:38 +0300
committerPaul Buetow <pbuetow@mimecast.com>2021-10-19 19:50:38 +0300
commitddfdb8e01aea4f8b6127834a14b74c5c534820d1 (patch)
treeb1aef37c10dfc61f53b30fa91c4c41c8d2455148
parent860c41441b3bcf542b5701ae2257812879ce47b4 (diff)
lowercase log rotation comparison
-rw-r--r--internal/io/dlog/loggers/strategy.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/io/dlog/loggers/strategy.go b/internal/io/dlog/loggers/strategy.go
index 25d10f0..48e7d44 100644
--- a/internal/io/dlog/loggers/strategy.go
+++ b/internal/io/dlog/loggers/strategy.go
@@ -3,6 +3,7 @@ package loggers
import (
"os"
"path/filepath"
+ "strings"
)
// Rotation is the actual strategy used for log rotation..
@@ -25,7 +26,7 @@ type Strategy struct {
// NewStrategy returns the stratey based on its name.
func NewStrategy(name string) Strategy {
- switch name {
+ switch strings.ToLower(name) {
case "daily":
return Strategy{DailyRotation, ""}
default: