aboutsummaryrefslogtreecommitdiff
path: root/web/apache/log
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-04-29 23:55:46 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-04-30 23:57:17 +0300
commit8f3d3956b1e837c726859eb8bbe19dad79c54a42 (patch)
tree81ded52db212b12c7f685165702cce90aa0233cf /web/apache/log
parentea60a6df471706a0eeb5ff1f774d69abe89e4bc9 (diff)
Add hxx extension for headers and lib prefix for library dirs
Diffstat (limited to 'web/apache/log')
-rw-r--r--web/apache/log81
1 files changed, 0 insertions, 81 deletions
diff --git a/web/apache/log b/web/apache/log
deleted file mode 100644
index dda9099..0000000
--- a/web/apache/log
+++ /dev/null
@@ -1,81 +0,0 @@
-// file : web/apache/log -*- C++ -*-
-// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
-// license : MIT; see accompanying LICENSE file
-
-#ifndef WEB_APACHE_LOG
-#define WEB_APACHE_LOG
-
-#include <httpd.h> // request_rec, server_rec
-#include <http_log.h>
-#include <http_config.h> // module
-
-#include <cstdint> // uint64_t
-#include <algorithm> // min()
-
-#include <web/module>
-
-namespace web
-{
- namespace apache
- {
- class log: public web::log
- {
- public:
-
- log (server_rec* s, const ::module* m) noexcept
- : server_ (s), module_ (m) {}
-
- virtual void
- write (const char* msg) {write (APLOG_ERR, msg);}
-
- // Apache-specific interface.
- //
- void
- write (int level, const char* msg) const noexcept
- {
- write (nullptr, 0, nullptr, level, msg);
- }
-
- void
- write (const char* file,
- std::uint64_t line,
- const char* func,
- int level,
- const char* msg) const noexcept
- {
- if (file && *file)
- file = nullptr; // Skip file/line placeholder from log line.
-
- level = std::min (level, APLOG_TRACE8);
-
- if (func)
- ap_log_error (file,
- line,
- module_->module_index,
- level,
- 0,
- server_,
- "[%s]: %s",
- func,
- msg);
- else
- // Skip function name placeholder from log line.
- //
- ap_log_error (file,
- line,
- module_->module_index,
- level,
- 0,
- server_,
- ": %s",
- msg);
- }
-
- private:
- server_rec* server_;
- const ::module* module_; // Apache module.
- };
- }
-}
-
-#endif // WEB_APACHE_LOG