erlang/otp

cth_log_redirect drops all log entries that have a user supplied domain

RoadRunnr opened this issue · 1 comments

Describe the bug

Log messages with domain metadata that is not [otp,sasl] or [otp] are being dropped by cth_log_redirect and will not show up in the ct log.
This resembles the default filter configuration of the default handler. However, the default configuration can be changed, while the domain filter in cth_log_redirect is hard coded.

To Reproduce

In a unit test with ?LOG(alert, "This is an alert", #{domain => [user, domain]}), the log message will not end up in the ct log at all and there is no way to change that through configuration.

Expected behavior

Message is part of the ct log (possibly after some kind of configuration has been applied).

Affected versions

OTP-26.2 (probably all versions that support logger).