mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 13:26:01 +03:00
Moves debuglog stuff inside the debug_log namespace
This commit is contained in:
parent
a3787fedb8
commit
64e2927922
@ -28,6 +28,8 @@ typedef struct DebugLog_t DebugLog;
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace modsecurity {
|
||||
namespace debug_log {
|
||||
|
||||
|
||||
/** @ingroup ModSecurity_CPP_API */
|
||||
class DebugLog {
|
||||
@ -51,6 +53,8 @@ class DebugLog {
|
||||
std::string m_fileName;
|
||||
};
|
||||
|
||||
|
||||
} // namespace debug_log
|
||||
} // namespace modsecurity
|
||||
#endif
|
||||
|
||||
|
@ -45,6 +45,7 @@ namespace Parser {
|
||||
class Driver;
|
||||
}
|
||||
|
||||
using modsecurity::debug_log::DebugLog;
|
||||
|
||||
/** @ingroup ModSecurity_CPP_API */
|
||||
class ConfigInt {
|
||||
|
@ -247,8 +247,8 @@ libmodsecurity_la_SOURCES = \
|
||||
audit_log/writer/parallel.cc \
|
||||
modsecurity.cc \
|
||||
rules.cc \
|
||||
debug_log.cc \
|
||||
debug_log_writer.cc \
|
||||
debug_log/debug_log.cc \
|
||||
debug_log/debug_log_writer.cc \
|
||||
macro_expansion.cc \
|
||||
rule.cc \
|
||||
rule_message.cc \
|
||||
|
@ -19,11 +19,13 @@
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include "src/debug_log_writer.h"
|
||||
#include "src/debug_log/debug_log_writer.h"
|
||||
#include "src/debug_log_writer_agent.h"
|
||||
|
||||
|
||||
namespace modsecurity {
|
||||
namespace debug_log {
|
||||
|
||||
|
||||
DebugLog::~DebugLog() {
|
||||
DebugLogWriter::getInstance().close(m_fileName);
|
||||
@ -79,4 +81,5 @@ void DebugLog::write(int level, const std::string &msg) {
|
||||
}
|
||||
|
||||
|
||||
} // namespace debug_log
|
||||
} // namespace modsecurity
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "src/debug_log_writer.h"
|
||||
#include "src/debug_log/debug_log_writer.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@ -28,7 +28,7 @@
|
||||
#include <fstream>
|
||||
|
||||
namespace modsecurity {
|
||||
|
||||
namespace debug_log {
|
||||
|
||||
debug_log_file_handler_t *DebugLogWriter::find_handler(
|
||||
const std::string &fileName) {
|
||||
@ -240,4 +240,5 @@ void DebugLogWriter::write_log(const std::string& fileName,
|
||||
}
|
||||
|
||||
|
||||
} // namespace debug_log
|
||||
} // namespace modsecurity
|
@ -24,11 +24,12 @@
|
||||
#include <cstring>
|
||||
|
||||
|
||||
#ifndef SRC_DEBUG_LOG_WRITER_H_
|
||||
#define SRC_DEBUG_LOG_WRITER_H_
|
||||
#ifndef SRC_DEBUG_LOG_DEBUG_LOG_WRITER_H_
|
||||
#define SRC_DEBUG_LOG_DEBUG_LOG_WRITER_H_
|
||||
|
||||
|
||||
namespace modsecurity {
|
||||
namespace debug_log {
|
||||
|
||||
|
||||
typedef struct debug_log_file_handler {
|
||||
@ -77,6 +78,7 @@ class DebugLogWriter {
|
||||
};
|
||||
|
||||
|
||||
} // namespace debug_log
|
||||
} // namespace modsecurity
|
||||
|
||||
#endif // SRC_DEBUG_LOG_WRITER_H_
|
||||
#endif // SRC_DEBUG_LOG_DEBUG_LOG_WRITER_H_
|
@ -23,7 +23,7 @@
|
||||
|
||||
namespace modsecurity_test {
|
||||
|
||||
class CustomDebugLog : public modsecurity::DebugLog {
|
||||
class CustomDebugLog : public modsecurity::debug_log::DebugLog {
|
||||
public:
|
||||
CustomDebugLog *new_instance();
|
||||
~CustomDebugLog();
|
||||
|
Loading…
x
Reference in New Issue
Block a user