A quick solution for this single case would be to add the numbers as aliases for the log levels.
A more complete solution would be to add a way to configure which level maps to which value and maybe even to which text/background (eg error could be red text and fatal could be black text on red background).
Pino (the popular node logger) user number for log levels: https://github.com/pinojs/pino/blob/main/docs/api.md#loggerlevels-object
A quick solution for this single case would be to add the numbers as aliases for the log levels.
A more complete solution would be to add a way to configure which level maps to which value and maybe even to which text/background (eg error could be red text and fatal could be black text on red background).