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

Enable log filtering #2844

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Enable log filtering #2844

wants to merge 2 commits into from

Conversation

a-turko
Copy link

@a-turko a-turko commented Jul 6, 2023

Enable users to decide for what kinds of log messages their log callbacks will be called. This filtering happens in the library in
order to avoid the malloc call in log__printf (logging_mosq.c) for messages that would be ignored anyway.

By default, no messages are filtered out. The set of allowed log types can be configured by mosquitto_log_levels_set.

Also, this pull request adds a unit test of this feature.

Note:
Two tests failed locally: 06-bridge-clean-session-csF-lcsT.py and c/03-publish-c2b-qos2-maximum-qos-1.test, but those were already failing before these changes.

Enable the users to decide for what kinds of log messages their log
callbacks will be called. This filtering happens in the library in
order to avoid the malloc call in log__printf (logging_mosq.c) for
messages that would be ignored anyway.
By default, no messages are filtered out. The set of allowed log types
can be configured by mosquitto_log_levels_set.

Note: Two additional log level masks (WARNING_AND_ABOVE and
      NOTICE_AND_ABOVE) have been added as shortcuts for
      convenience.

Signed-off-by: Andrzej Turko <[email protected]>
@a-turko a-turko changed the title Develop -- log filtering Enable log filtering Jul 6, 2023
@a-turko
Copy link
Author

a-turko commented Jul 19, 2023

Is there something wrong with this PR? Should I have included the requirement checklist in the message?
Is there anything else I could do to get the approval for the workflows?

@a-turko
Copy link
Author

a-turko commented Jul 24, 2023

@ralight, what do you think about this change?

Is there something wrong with this PR? Should I have included the requirement checklist in the message? Is there anything else I could do to get the approval for the workflows?

@moncefmechri
Copy link

@ralight is there anything blocking this PR from being considered?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants