To create a summary log file format
Steps
- In the Content Gateway manager, go to the Configure > Subsystems > Logging > Custom tab to display the logs_xml.config file.
-
Define the format of the log file as follows:
<LogFormat> <Name = "summary"/> <Format = "%<operator(field)> : %<operator(field)>"/> <Interval = "n"/> </LogFormat>
Here:
- “operator” is one of the five aggregate operators (COUNT, SUM, AVERAGE, FIRST, LAST). You can specify more than one operator in the format line.
- “field” is the logging field that you want to aggregate.
- “n” is the interval in seconds between summary log entries. For more information, see logs_xml.config.
For example, the following format generates one entry every 10 seconds, with each entry summarizing the time stamp of the last entry of the interval, a count of the number of entries seen within that 10-second interval, and the sum of all bytes sent to the client:
<LogFormat> <Name = "summary"/> <Format = "%<LAST(cqts)> : %<COUNT(*)> : %<SUM(psql)>"/> <Interval = "10"/> </LogFormat>
Important:You cannot create a format specification that contains both aggregate operators and regular fields. For example, the following specification would be invalid:
<Format = "%<LAST(cqts)> : %<COUNT(*)> :
%<SUM(psql)> : %<cqu>"/>
- Define a LogObject that uses this format.
- Click Apply.