Variable: logview-additional-level-mappings
logview-additional-level-mappings is a customizable variable defined
in logview.el.
Value
nil
Documentation
Association list of log level mappings.
A few common maps are already defined by the mode in variable
logview-std-level-mappings, but the ones you add here always
take precedence.
Each mapping has a name, by which it is referred from submode definition. Mapping itself consists of five lists of strings: error levels, warning levels, information levels, debug levels and trace levels. In these lists you should add all possible real levels that can appear in log file, in descending order of severity.
For example, for Java SLF4J (Log4j, Logback, etc.) the mapping looks like this:
Error levels: ERROR
Warning levels: WARN
Information levels: INFO
Debug levels: DEBUG
Trace levels: TRACE
This is not a coincidence, as the mode is primarily targeted at SLF4J log files.
However, mapping for JUL (java.util.logging) framework looks more complicated:
Error levels: SEVERE
Warning levels: WARNING
Information levels: INFO
Debug levels: CONFIG, FINE
Trace levels: FINER, FINEST
JUL has seven severity levels and we need to map them to five the mode supports. So the last two lists contain two levels each. It is also legal to have empty lists, usually if there are less than five levels, or if some of the levels do not conceptually map to the levels of the mode. This is the case with RFC 5424:
Error levels: EMERGENCY, ALERT, CRITICAL, ERROR
Warning levels: WARNING
Information levels: NOTICE, INFO
Debug levels: DEBUG
Trace levels:
Mapping can have any number of optional aliases, which work just as the name.
Source Code
;; Defined in /nix/store/3zkn9hgpv447zb8nrg55d9x2ynmmrk40-emacs-packages-deps/share/emacs/site-lisp/elpa/logview-20260218.2013/logview.el
(defcustom logview-additional-level-mappings nil
"Association list of log level mappings.
A few common maps are already defined by the mode in variable
`logview-std-level-mappings', but the ones you add here always
take precedence.
Each mapping has a name, by which it is referred from submode
definition. Mapping itself consists of five lists of strings:
error levels, warning levels, information levels, debug levels
and trace levels. In these lists you should add all possible
real levels that can appear in log file, in descending order of
severity.
For example, for Java SLF4J (Log4j, Logback, etc.) the mapping
looks like this:
Error levels: ERROR
Warning levels: WARN
Information levels: INFO
Debug levels: DEBUG
Trace levels: TRACE
This is not a coincidence, as the mode is primarily targeted at
SLF4J log files.
However, mapping for JUL (java.util.logging) framework looks more
complicated:
Error levels: SEVERE
Warning levels: WARNING
Information levels: INFO
Debug levels: CONFIG, FINE
Trace levels: FINER, FINEST
JUL has seven severity levels and we need to map them to five the
mode supports. So the last two lists contain two levels each.
It is also legal to have empty lists, usually if there are less
than five levels, or if some of the levels do not conceptually
map to the levels of the mode. This is the case with RFC 5424:
Error levels: EMERGENCY, ALERT, CRITICAL, ERROR
Warning levels: WARNING
Information levels: NOTICE, INFO
Debug levels: DEBUG
Trace levels:
Mapping can have any number of optional aliases, which work just
as the name."
:type '(repeat (cons (string :tag "Name")
(list :tag "Definition"
(cons :tag "" (const :tag "Error levels:" error) (repeat string))
(cons :tag "" (const :tag "Warning levels:" warning) (repeat string))
(cons :tag "" (const :tag "Information levels:" information) (repeat string))
(cons :tag "" (const :tag "Debug levels:" debug) (repeat string))
(cons :tag "" (const :tag "Trace levels:" trace) (repeat string))
(set :inline t
(cons :tag "" (const :tag "Aliases:" aliases) (repeat string))))))
:set #'logview--set-submode-affecting-variable)