logger_json
logger_json copied to clipboard
feat: Use erl_level as severity
Since Elixir 1.11.0, Logger supports syslog levels such as notice, critical, alert, and emergency to be passed in Logger's erl_level metadata.
Google Cloud Logger LogEntry also supports these as LogSeverity: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#LogSeverity
This PR makes these levels to be logged as severity.
Note that, for backward compatibility, this treats 'warn' as 'warning' level.