mirror of
https://github.com/amir20/dozzle.git
synced 2026-01-05 12:25:32 +01:00
feat: adds warning as possible level
This commit is contained in:
@@ -130,7 +130,7 @@ var ANSI_COLOR_REGEX = regexp.MustCompile(`\x1b\[[0-9;]*m`)
|
||||
func guessLogLevel(logEvent *LogEvent) string {
|
||||
switch value := logEvent.Message.(type) {
|
||||
case string:
|
||||
levels := []string{"error", "warn", "info", "debug", "trace", "fatal"}
|
||||
levels := []string{"error", "warn", "warning", "info", "debug", "trace", "fatal"}
|
||||
stripped := ANSI_COLOR_REGEX.ReplaceAllString(value, "") // remove ansi color codes
|
||||
for _, level := range levels {
|
||||
if match, _ := regexp.MatchString("(?i)^"+level+"[^a-z]", stripped); match {
|
||||
|
||||
Reference in New Issue
Block a user