Repository navigation
log: per-module LogLevel now applies to all of mod_crowdsec's log lines - #27
Merged
Merged
Conversation
Only mod_crowdsec.c got a module index, from AP_DECLARE_MODULE. Lines logged from the other files - the poller, the store, metrics, AppSec, config - were tagged [:level] and ignored per-module log levels, so "LogLevel warn crowdsec:info" (as documented in the README) showed none of them. APLOG_USE_MODULE(crowdsec) in each of those files fixes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
buixor
approved these changes
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Only
mod_crowdsec.cdeclared the module, throughAP_DECLARE_MODULE. Lines logged from the other files (poller, store, metrics, AppSec, config) showed up as[:info]and ignored per-module log levels. As a result,LogLevel warn crowdsec:info, the setup the README documents, did not show the poller and store messages.Fix
APLOG_USE_MODULE(crowdsec);incrowdsec_{appsec,config,lapi,metrics,poller}.c. It is not added tomod_crowdsec.c, which already gets it fromAP_DECLARE_MODULE; a second declaration fails to compile.Tested
Built with no warnings and
make checkpasses. On a live Debian 13 host withLogLevel warn crowdsec:info:[crowdsec:info].crowdsec_module:infoworks as well.🤖 Generated with Claude Code