mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Adds request IDs and URIs to the debug log
This commit is contained in:
@@ -72,6 +72,18 @@ int DebugLog::getDebugLogLevel() {
|
||||
}
|
||||
|
||||
|
||||
void DebugLog::write(int level, const std::string &id,
|
||||
const std::string &uri, const std::string &msg) {
|
||||
if (level <= m_debugLevel) {
|
||||
std::string msgf = "[" + std::to_string(level) + "] " + msg;
|
||||
msgf = "[" + id + "] [" + uri + "] " + msgf;
|
||||
|
||||
DebugLogWriter &d = DebugLogWriter::getInstance();
|
||||
d.write_log(m_fileName, msgf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DebugLog::write(int level, const std::string &msg) {
|
||||
if (level <= m_debugLevel) {
|
||||
std::string msgf = "[" + std::to_string(level) + "] " + msg;
|
||||
|
Reference in New Issue
Block a user