Skip to content

Commit 584d1e4

Browse files
committed
feature: Allow to set the verbosity of the debug
Signed-off-by: Julien Godin <[email protected]>
1 parent 19eb28a commit 584d1e4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

manifests/mod/security.pp

+5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
# @param modsec_secruleengine
2424
# Configures the rules engine.
2525
#
26+
# @param debug_log_level
27+
# Configures the debug log level.
28+
#
2629
# @param audit_log_relevant_status
2730
# Configures which response status code is to be considered relevant for the purpose of audit logging.
2831
#
@@ -140,6 +143,7 @@
140143
Optional[Array[String]] $custom_rules_set = $apache::params::modsec_custom_rules_set,
141144
Stdlib::Absolutepath $modsec_dir = $apache::params::modsec_dir,
142145
String $modsec_secruleengine = $apache::params::modsec_secruleengine,
146+
Integer[0, 9] $debug_log_level = 0,
143147
String $audit_log_relevant_status = '^(?:5|4(?!04))',
144148
String $audit_log_parts = $apache::params::modsec_audit_log_parts,
145149
String $audit_log_type = $apache::params::modsec_audit_log_type,
@@ -258,6 +262,7 @@
258262
'audit_log_type' => $audit_log_type,
259263
'audit_log_storage_dir' => $audit_log_storage_dir,
260264
'logroot' => $logroot,
265+
'debug_log_level' => $debug_log_level,
261266
}
262267

263268
file { 'security.conf':

templates/mod/security.conf.epp

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
SecResponseBodyMimeType text/plain text/html text/xml
4545
SecResponseBodyLimit 524288
4646
SecResponseBodyLimitAction <%= $secresponsebodylimitaction %>
47-
SecDebugLogLevel 0
47+
SecDebugLogLevel <%= $debug_log_level %>
4848
SecAuditEngine RelevantOnly
4949
SecAuditLogRelevantStatus "<%= $audit_log_relevant_status %>"
5050
SecAuditLogParts <%= $audit_log_parts %>

0 commit comments

Comments
 (0)