Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cth_log_redirect drops all log entries that have a user supplied domain #8502

Open
RoadRunnr opened this issue May 22, 2024 · 1 comment
Open
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM

Comments

@RoadRunnr
Copy link
Contributor

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).

@RoadRunnr RoadRunnr added the bug Issue is reported as a bug label May 22, 2024
@IngelaAndin IngelaAndin added the team:VM Assigned to OTP team VM label May 23, 2024
@garazdawi
Copy link
Contributor

Yes, I agree that this behaviour is wrong. The hook should copy the filters from the default handler just as it does for formatter and level. That would allow the user to override the behaviour.

Not sure when we will have time to work on this, a PR will as always speed up the process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM
Projects
None yet
Development

No branches or pull requests

3 participants