*Back to [[Book|Administrator's Configuration File Reference#cfr]] [[Topic|Administrator's Configuration File Reference#chap7]]*
h2. {{Addlog}}
The {{AddLog}} directives are executed to record information about the transaction. For more information, see [{{AddLog}}|Flow of Control in obj.conf#add].
The following {{AddLog}}-class function is described in detail in this section:
* [#{{flex-log}}]
In addition, the following common SAFs are valid for the {{AddLog}} directive:
* [{{match-browser}}|Common SAFs across Multiple Directives#saf2]
* [{{set-variable}}|Common SAFs across Multiple Directives#saf8]
h3. {{flex-log}} {anchor:add1}
The {{flex-log}} function records request-specific data in a flexible log format. It can also record requests in the common log format. There is a log analyzer, {{flexanlg}}, in the {{/bin}} directory for Web Server. There are also a number of free statistics generators for the common log format.
Specify the log format using the {{format}} subelement of the {{access-log}} element in {{server.xml}}. For more information, see [{{access-log}}|A#a1]. For more information on the log format, see [Appendix C: Using the Custom Log File Format|Administrator's Configuration File Reference#appC].
h4. Parameters
The following table describes parameters for the {{flex-log}} function.
Table 7-106 {{flex-log}} Parameters
||Parameter ||Description ||
|{{name}} |(Optional) Specifies the name of a log file. The name must previously been defined by an {{access-log}} element in {{server.xml}}. If no name is given, the entry is recorded in the default log file. |
|{{iponly}} |(Optional) Instructs the server to log the IP address of the remote client rather than looking up and logging the DNS name. This improves performance if DNS is turned off. The value of {{iponly}} has no significance, as long as it exists; you may use {{iponly=1}}. |
|{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. |
h4. Example
{code}
# Log all accesses to the default log file
AddLog fn="flex-log"
# Log accesses from outside our subnet (198.93.5.*) to
# nonlocallog
<Client ip="*~198.93.5.*">
AddLog fn="flex-log" name="nonlocallog"
</Client>
{code}
h2. {{Addlog}}
The {{AddLog}} directives are executed to record information about the transaction. For more information, see [{{AddLog}}|Flow of Control in obj.conf#add].
The following {{AddLog}}-class function is described in detail in this section:
* [#{{flex-log}}]
In addition, the following common SAFs are valid for the {{AddLog}} directive:
* [{{match-browser}}|Common SAFs across Multiple Directives#saf2]
* [{{set-variable}}|Common SAFs across Multiple Directives#saf8]
h3. {{flex-log}} {anchor:add1}
The {{flex-log}} function records request-specific data in a flexible log format. It can also record requests in the common log format. There is a log analyzer, {{flexanlg}}, in the {{/bin}} directory for Web Server. There are also a number of free statistics generators for the common log format.
Specify the log format using the {{format}} subelement of the {{access-log}} element in {{server.xml}}. For more information, see [{{access-log}}|A#a1]. For more information on the log format, see [Appendix C: Using the Custom Log File Format|Administrator's Configuration File Reference#appC].
h4. Parameters
The following table describes parameters for the {{flex-log}} function.
Table 7-106 {{flex-log}} Parameters
||Parameter ||Description ||
|{{name}} |(Optional) Specifies the name of a log file. The name must previously been defined by an {{access-log}} element in {{server.xml}}. If no name is given, the entry is recorded in the default log file. |
|{{iponly}} |(Optional) Instructs the server to log the IP address of the remote client rather than looking up and logging the DNS name. This improves performance if DNS is turned off. The value of {{iponly}} has no significance, as long as it exists; you may use {{iponly=1}}. |
|{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. |
h4. Example
{code}
# Log all accesses to the default log file
AddLog fn="flex-log"
# Log accesses from outside our subnet (198.93.5.*) to
# nonlocallog
<Client ip="*~198.93.5.*">
AddLog fn="flex-log" name="nonlocallog"
</Client>
{code}