Payload logging enables
you to capture the JSON payload, for both input and output, and log
it to a file, so that it can be harvested and analyzed.
The data is captured
in text files. The files are managed using log4j and can be configured
to roll over daily or when the file reaches a particular size. The
files are created in the same location as the system log file. The
name of the file is SASMicroAnalyticServiceMessages<version_number>.log.
Every node in the cluster produces its own file. It is possible to
change the location by modifying the log4j configuration ID. It is
recommended that the file be local to the cluster node, to minimize
impact on system performance.
For every invocation
of the REST service, a single line that contains the timestamp is
logged. The timestamp is followed by a payload JSON object that contains
both the request and the response representations. The timestamp is
a fixed size. The payload object is not.
Payload logging can
be turned on by defining the system property sas.mas.message.audit
and setting its value to TRACE. This change can be made in the wrapper.conf
file (Windows) or setenv.sh (UNIX) as shown below:
-
In setenv.sh (UNIX): -Dsas.mas.message.audit=TRACE
-
In wrapper.conf (Windows): wrapper.java.additional.50=-Dsas.mas.message.audit=TRACE