...
Info | ||||||||
---|---|---|---|---|---|---|---|---|
Example. Configuration filenamesDefault configuration file:
EC specific configuration file for ec1:
Copying the default configuration file into an EC specific configuration file:
Copying a template configuration file into an EC specific configuration file:
|
The following template configuration files are included by default:
...
The files listed above have a different log level setting but are otherwise identical.
Whenever the APL function log.*
is called in the Analysis agent, this function invokes logging with log4j. After the workflow is done executing with a specific EC, a new EC specific configuration file <ec-name>-apl-log4j.properties
will be created. This new EC specific configuration file is created by default with the same configurations saved in the file apl-log4j.properties
. For instance, if the EC name is ec1 then ec1-apl-log4j.properties
is created in $MZ_HOME/etc/logging
and will have identical settings as apl-log4j.properties
.
MZSH does not support dedicated commands to make changes to the log level. Changes on the log level and other properties in the configuration file must be made manually. Whatever changes made to the configuration file takes effect at the next workflow run without the need to restart the EC.
In a multi-host installation, the EC specific configuration file is always created on the host where EC is located. Therefore, log4j always read the EC specific configuration according to the EC location. For instance, workflow run by ec1 located on host my-host-name
. The log4j always read the EC specific configuration file ec1-apl-log4j.properties
located at path $MZ_HOME/etc/logging on host my-host-name
.
The content of the files defines the logging.
...
Info | ||||||
---|---|---|---|---|---|---|
Examples Appender Configurations
The appender named Default will write a single file for all workflows contained under the Default folder.
The appender named Primary will create multiple files; one for each workflow instance based on the RT_Folder.RT_TEST_WF workflow.
The appender Secondary will create a single file for each workflow instance based on the RT_Folder.RT_TEST_WF workflow. The file will take the name of the first workflow instance it encounters, for example "RT_Folder.RT_TEST_WF.workflow_1" |
Tip |
---|
Hint!You can change the maximum file size and the number of backup files by adding the following lines: If you want to apply the filtering rule to all APL configurations in the default folder, change the last line in the previous example to |
Info |
---|
...
Example. Sets the general log level to ERROR and to DEBUG for the agent named agent_1
|
Note |
---|
Note!For performance reasons it is recommended to use the |
For more information about available settings, see the log4j documentation at https://logging.apache.org/log4j/1.2/manual.html.
...
The fields in the log output are described below.
Field | Description |
---|---|
timestamp | The time when the message was logged. The UTC timezone and international standard date and time notation is used by default.
For information about how to use SimpleDateFormat patterns, see: |
level | The log level i e |
thread | The name of the workflow thread. |
category | The logged configuration. This field contains the |
message | The log message is specified in the APL command. |
pico | The name of the Execution Context. |
Warning |
---|
Warning!The ECs must be restarted if you manually delete or rename active log files or backup log files. |
Tip |
---|
Hint!If the log files are not generated as expected, review the EC logs. Your configuration files may contain errors. |