Examples

The following is an example of a LogFormat specification collecting information using three common fields:

<LogFormat>
<Name = "minimal"/>
<Format = "%<chi> : %<cqu> : %<pssc>"/>
</LogFormat>

The following is an example of a LogFormat specification using aggregate operators:

<LogFormat>
<Name = "summary"/>
<Format = "%<LAST(cqts)> : %<COUNT(*)> : %<SUM(psql)>"/>
<Interval = "10"/>
</LogFormat>

The following is an example of a LogFilter that will cause only REFRESH_HIT entries to be logged:

<LogFilter>
<Name = "only_refresh_hits"/>
<Action = "ACCEPT"/>
<Condition = "%<pssc> MATCH REFRESH_HIT"/>
</LogFilter>
Note:

When specifying the field in the filter condition, you can omit the %<>. This means that the following filter is equivalent to the example directly above:

<LogFilter>

<Name = "only_refresh_hits"/>

<Action = "ACCEPT"/>

<Condition = "pssc MATCH REFRESH_HIT"/>

</LogFilter>

The following is an example of a LogObject specification that creates a local log file for the minimal format defined earlier. The log filename will be minimal.log because this is an ASCII log file (the default).

<LogObject>
<Format = "minimal"/>
<Filename = "minimal"/>
</LogObject>

The following is an example of a LogObject specification that includes only HTTP requests served by hosts in the domain company.com or by the specific server server. somewhere.com. Log entries are sent to collation host logs.company.com on port 4000 and to collation host 209.131.52.129 on port 5000.

<LogObject>
<Format = "minimal"/>
<Filename = "minimal"/>
<ServerHosts = "company.com,server.somewhere.com"/>
<Protocols = "http"/>
<CollationHosts = "logs.company.com:4000,209.131.52.
129:5000"/>
</LogObject>