aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/apache/service20
-rw-r--r--web/module9
2 files changed, 24 insertions, 5 deletions
diff --git a/web/apache/service b/web/apache/service
index 32ca98d..9641a6b 100644
--- a/web/apache/service
+++ b/web/apache/service
@@ -84,18 +84,27 @@ namespace web
template <typename M>
static int
- config_finalizer (apr_pool_t*, apr_pool_t*, apr_pool_t*, server_rec*)
+ config_finalizer (apr_pool_t*, apr_pool_t*, apr_pool_t*, server_rec* s)
noexcept
{
- instance<M> ()->options_parsed_ = true;
+ auto srv (instance<M> ());
+ bool& parsed (srv->options_parsed_);
+
+ if (!parsed)
+ {
+ log l (s);
+ srv->exemplar_.version (l);
+ parsed = true;
+ }
+
return OK;
}
template <typename M>
static void
- worker_initializer (apr_pool_t*, server_rec* server) noexcept
+ worker_initializer (apr_pool_t*, server_rec* s) noexcept
{
- log l (server);
+ log l (s);
instance<M> ()->init_worker (l);
}
@@ -125,7 +134,8 @@ namespace web
add_option (const char* name, optional<std::string> value);
template <typename M>
- int handle (request& r, log& l) noexcept;
+ int
+ handle (request& r, log& l) noexcept;
private:
std::string name_;
diff --git a/web/module b/web/module
index 50cc6be..704fa6d 100644
--- a/web/module
+++ b/web/module
@@ -195,6 +195,15 @@ namespace web
options () = 0;
// During startup the web server calls this function on the module
+ // exemplar to log the module version information. It is up to the web
+ // server whether to call this function once per module implementation
+ // type. Therefore, it is expected that this function will log the same
+ // information for all the module exemplars.
+ //
+ virtual void
+ version (log&) = 0;
+
+ // During startup the web server calls this function on the module
// exemplar passing a list of configuration options. The place these
// configuration options come from is implementation-specific (normally
// a configuration file). The web server guarantees that only options