From ddfdb8e01aea4f8b6127834a14b74c5c534820d1 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 19 Oct 2021 19:50:38 +0300 Subject: lowercase log rotation comparison --- internal/io/dlog/loggers/strategy.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/io/dlog') 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: -- cgit v1.2.3