All functions exported from this module can be used as primary
or handler
filters. See
Filters are removed with
This filter provides a way of filtering log events based on a
A domain field must be a list of atoms, creating smaller
and more specialized domains as the list grows longer. The
greatest domain is
For example, consider the following domains:
D1 = [otp] D2 = [otp, sasl]
The above domains are used for logs originating from
Erlang/OTP. D1 specifies that the log event comes from
Erlang/OTP in general, and D2 indicates that the log event
is a so
called
The
The filter compares the value of the
and
and
and
and
and there is no domain field in metadata. In this
case
If the filter matches and
If the filter does not match, it returns
Log events that do not contain any domain field, match only
when
Example: stop all events with domain
logger:set_handler_config(h1, filter_default, log). % this is the default
Filter = {fun logger_filters:domain/2, {stop, sub, [otp, sasl]}}.
logger:add_handler_filter(h1, no_sasl, Filter).
ok
This filter provides a way of filtering log events based
on the log level. It matches log events by comparing the
log level with a specified
The
The filter compares the value of the event's log level
(
and the compare function returns
and the compare function returns
and the compare function returns
and the compare function returns
and the compare function returns
and the compare function returns
If the filter matches and
If the filter does not match, it returns
Example: only allow debug level log events
logger:set_handler_config(h1, filter_default, stop).
Filter = {fun logger_filters:level/2, {log, eq, debug}}.
logger:add_handler_filter(h1, debug_only, Filter).
ok
This filter matches all progress reports
from
If
The filter returns
This filter matches all events originating from a process that has its group leader on a remote node.
If
The filter returns