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7̮d!g3}pU`H}$}GFR[~6)mA?h X^|KXb˹췡_$T[:\zqL Log message after request to /foo/* is processed:
<Location "/foo/">
  LogMessage "/foo/ has been requested"
</Location>
  • Log message if request to /foo/* is processed in a sub-request:
    <Location "/foo/">
      LogMessage "subrequest to /foo/" hook=type_checker "expr=-T %{IS_SUBREQ}"
    </Location>
    The default log_transaction hook is not executed for sub-requests, therefore we have to use a different hook.
  • Log message if an IPv6 client causes a request timeout:
    LogMessage "IPv6 timeout from %{REMOTE_ADDR}" "expr=-T %{IPV6} && %{REQUEST_STATUS} = 408"
    Note the placing of the double quotes for the expr= argument.
  • Log the value of the "X-Foo" request environment variable in each stage of the request:
    <Location "/">
      LogMessage "%{reqenv:X-Foo}" hook=all
    </Location>
    Together with microsecond time stamps in the error log, hook=all also lets you determine the times spent in the different parts of the request processing.
  • top

    LogMessage Directive

    Description:Log user-defined message to error log
    Syntax:LogMessage message [hook=hook] [expr=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. References to HTTP headers will not cause header names to be added to the Vary header. The messages are logged at loglevel info.

    The hook specifies before which phase of request processing the message will be logged. The following hooks are supported:

    Name
    pre_translate_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. References to HTTP headers will not cause the header names to be added to the Vary header.

    Available Languages:  en  |  fr 

    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our mailing lists.