I am trying to convert the mongodb log levels from single characters to normal values. Is there a simpler way to do this than:
if [level] == "D" {
mutate { gsub => [ "level", "D", "DEBUG" ] }
}
if [level] == "I" {
mutate { gsub => [ "level", "I", "INFO" ] }
}
if [level] == "W" {
mutate { gsub => [ "level", "W", "WARN" ] }
}
if [level] == "E" {
mutate { gsub => [ "level", "E", "ERROR" ] }
}
if [level] == "F" {
mutate { gsub => [ "level", "F", "FATAL" ] }
}