diff options
| author | Paul Buetow <pbuetow@mimecast.com> | 2021-10-19 19:50:38 +0300 |
|---|---|---|
| committer | Paul Buetow <pbuetow@mimecast.com> | 2021-10-19 19:50:38 +0300 |
| commit | ddfdb8e01aea4f8b6127834a14b74c5c534820d1 (patch) | |
| tree | b1aef37c10dfc61f53b30fa91c4c41c8d2455148 | |
| parent | 860c41441b3bcf542b5701ae2257812879ce47b4 (diff) | |
lowercase log rotation comparison
| -rw-r--r-- | internal/io/dlog/loggers/strategy.go | 3 |
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: |
