Skip to content

Commit 243d9c9

Browse files
author
Marc Stern
committed
Log audit lock name in case of problem
1 parent 28b6e1d commit 243d9c9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apache2/msc_logging.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,7 +1474,8 @@ void sec_audit_logger_json(modsec_rec *msr) {
14741474
/* Unlock the mutex we used to serialise access to the audit log file. */
14751475
rc = apr_global_mutex_unlock(msr->modsecurity->auditlog_lock);
14761476
if (rc != APR_SUCCESS) {
1477-
msr_log(msr, 1, "Audit log: Failed to unlock global mutex: %s",
1477+
msr_log(msr, 1, "Audit log: Failed to unlock global mutex '%s': %s",
1478+
apr_global_mutex_lockfile(msr->modsecurity->auditlog_lock),
14781479
get_apr_error(msr->mp, rc));
14791480
}
14801481

@@ -2254,7 +2255,8 @@ void sec_audit_logger_native(modsec_rec *msr) {
22542255
/* Unlock the mutex we used to serialise access to the audit log file. */
22552256
rc = apr_global_mutex_unlock(msr->modsecurity->auditlog_lock);
22562257
if (rc != APR_SUCCESS) {
2257-
msr_log(msr, 1, "Audit log: Failed to unlock global mutex: %s",
2258+
msr_log(msr, 1, "Audit log: Failed to unlock global mutex '%s': %s",
2259+
apr_global_mutex_lockfile(msr->modsecurity->auditlog_lock),
22582260
get_apr_error(msr->mp, rc));
22592261
}
22602262

0 commit comments

Comments
 (0)