RAW_DATA
The RAW_DATA
element limits the size of a single log
message.
Syntax
<RAW_DATA MaxLength=length></RAW_DATA>
- Where length is the number of characters after which the log message is
truncated. The default value is set by the resource
$(res.log.raw_data.maxlength)
. The value must be a non-negative integer.
Child elements
There are no child elements.
Usage
You use this element to specify the length of log messages. Log messages can include the complete HTML response, and can therefore be very large (an entire HTML page). This element is optional, but if specified the maximum number of characters in any single log message is set.
If the RAW_DATA
element is omitted, data is logged in its entirety.
Usage example with resource
<RAW_DATA MaxLength="$(res.log.raw_data.maxlength)"/>
The default value
of the resource $(res.log.raw_data.maxlength)
is "-1". A length of -1 means the log
message length is not set. You can specify the length of log messages with the
resource:<RESOURCE Id="res.log.raw_data.maxlength" Source="INTERNAL">100</RESOURCE>
In
this example, the maximum number of characters in any single log message is 100 characters.Using the resource has advantages over setting the length directly for the following reasons:
- Shared Resource: The
$(res.log.raw_data.maxlength)
resource is shared by other configuration components, ensuring that any changes automatically apply everywhere it is used. - Command Line Override: You can override the default value from the command line when
starting the dispatcher by using the resource. For example:
httpdispatch -E res.log.raw_data.maxlength=80
.
Usage example - use RAW_DATA
directly
To set the length of log messages in your application configuration file
(xcf), add a
LOG
element with a RAW_DATA
element. In this example, the maximum number of characters in any single log message is 100
characters.<APPLICATION Parent="defaultwa">
#...
<LOG>
<RAW_DATA MaxLength="100" />
</AUTO_LOGOUT>
#...
</APPLICATION>
Parent elements
This element is a child of the LOG
element.