From: Igor Galić
In a caching scenario one would want to know about + the efficiency of the cache. A very simple method to + find this out would be:
+ +
+ SetEnv CACHE_MISS 1
+ LogFormat "%h %l %u %t "%r " %>s %b %{CACHE_MISS}e" common-cache
+ CustomLog logs/access_log common-cache
+
mod_cache
will run before
+ mod_env
and when successfull will deliver the
+ content without it. In that case a cache hit will log
+ -
, while a cache miss will log 1
.
Although we have just shown that conditional logging is very powerful and flexible, it is not the only way to control the contents of the logs. Log files are more useful when they diff --git a/docs/manual/logs.xml b/docs/manual/logs.xml index 677ab847a6..d85e966c18 100644 --- a/docs/manual/logs.xml +++ b/docs/manual/logs.xml @@ -458,6 +458,21 @@ CustomLog logs/non_english_log common env=!english +
In a caching scenario one would want to know about + the efficiency of the cache. A very simple method to + find this out would be:
+ +-
, while a cache miss will log 1
.
Although we have just shown that conditional logging is very powerful and flexible, it is not the only way to control the contents of the logs. Log files are more useful when they