Apache HTTP Server Version 2.3

Available Languages: en
| Description: | Additional configurable debug logging |
|---|---|
| Status: | Experimental |
| Module Identifier: | log_debug_module |
| Source File: | mod_log_debug.c |
| Compatibility: | Available in Apache 2.3.14 and later |
<Location /foo/>
LogMessage "/foo/ has been requested"
</Location>
<Location /foo/>
LogMessage "subrequest to /foo/" hook=type_checker if=%{IS_SUBREQ}
</Location>
LogMessage "IPv6 timeout from %{REMOTE_ADDR}"
"if=-T %{IPV6} && %{REQUEST_STATUS} = 408"
if= argument.
<Location />
LogMessage "%{reqenv:X-Foo}" hook=all
</Location>
hook=all also allows to determine the times spent
in the different parts of the request processing.
| Description: | Log userdefined message to error log |
|---|---|
| Syntax: | LogMessage message
[hook=hook] [if=expression]
|
| Default: | Unset |
| Context: | directory |
| Status: | Experimental |
| Module: | mod_log_debug |
This directive causes a user defined message to be logged to the error log. The message can use variables and functions from the ap_expr syntax. The messages are logged at loglevel info.
The hook specifies before which phase of request procesing the message will be logged. The following hooks are supported:
| Name |
|---|
translate_name |
type_checker |
quick_handler |
map_to_storage |
check_access |
check_access_ex |
insert_filter |
check_authn |
check_authz |
fixups |
handler |
log_transaction |
The default is log_transaction. The special value
all is also supported, causing a message to be logged at each
phase. Not all hooks are executed for every request.
The optional expression allows to restrict the message if a condition is met. The details of the expression syntax are described in the ap_expr documentation.
Available Languages: en