aboutsummaryrefslogtreecommitdiff
path: root/web/apache/log
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-02-15 18:31:22 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-02-17 12:44:32 +0200
commita4290c2d3bf405675054420d3c653abfcb27a3ab (patch)
tree874b9ab4b8515002643ef72e482a702ebaf51caf /web/apache/log
parentb250ead8e7237813e9bbd91cb3a9382592bf4abc (diff)
Log brep module name to Apache error_log
Diffstat (limited to 'web/apache/log')
-rw-r--r--web/apache/log11
1 files changed, 7 insertions, 4 deletions
diff --git a/web/apache/log b/web/apache/log
index 40523d3..7318e32 100644
--- a/web/apache/log
+++ b/web/apache/log
@@ -5,8 +5,9 @@
#ifndef WEB_APACHE_LOG
#define WEB_APACHE_LOG
-#include <httpd.h> // request_rec
+#include <httpd.h> // request_rec
#include <http_log.h>
+#include <http_config.h> // module
#include <cstdint> // uint64_t
#include <algorithm> // min()
@@ -21,7 +22,8 @@ namespace web
{
public:
- log (server_rec* server) noexcept: server_ (server) {}
+ log (server_rec* s, const ::module* m) noexcept
+ : server_ (s), module_ (m) {}
virtual void
write (const char* msg) {write (APLOG_ERR, msg);}
@@ -49,7 +51,7 @@ namespace web
if (func)
ap_log_error (file,
line,
- APLOG_NO_MODULE,
+ module_->module_index,
level,
0,
server_,
@@ -61,7 +63,7 @@ namespace web
//
ap_log_error (file,
line,
- APLOG_NO_MODULE,
+ module_->module_index,
level,
0,
server_,
@@ -71,6 +73,7 @@ namespace web
private:
server_rec* server_;
+ const ::module* module_; // Apache module.
};
}
}