2.2.14 loglevel

usage: apl-loglevel [ display | set <level> ] <ec-names>

This command is used to select the active log4j APL logging configuration. The level argument to the command is based on the corresponding configuration filename in $MZ_HOME/etc/logging. For instance, the command below will activate the configuration in ec1-apl-log4j-myloglevel.properties on the Execution Context named ec1 and ec2-apl-log4j-myloglevel.properties on ec2. If any of these files cannot be found, the command will (if possible) apply the settings of a file without the Execution Context prefix, i e apl-log4j-myloglevel.properties.

Example - Setting log level

$ mzsh <username>/<password> apl-loglevel set myloglevel ec1 ec2 

You can view the configured log directory and refresh interval with the subcommand display.

Example - Display log level

$ mzsh <username>/<password> apl-loglevel display ec1 ec2
logdir = /opt/mz/etc/logging
refresh interval = 1000 ms
---------------------------------------------
Contents of: /opt/mz/etc/logging/ec1-apl-log4j.properties
---------------------------------------------
log4j.rootLogger=ALL, a
log4j.appender.a=com.digitalroute.apl.log.DRRollingFileAppender
log4j.appender.a.file=${mz.home}/log/{pico}_{workflow}.log
log4j.appender.a.layout=com.digitalroute.apl.log.JsonLayout
log4j.appender.a.layout.MdcFieldsToLog=pico, workflow, agent, 
tag
---------------------------------------------
---------------------------------------------
Contents of: /opt/mz/etc/logging/ec2-apl-log4j.properties
---------------------------------------------
log4j.rootLogger=ALL, a
log4j.appender.a=com.digitalroute.apl.log.DRRollingFileAppender
log4j.appender.a.file=${mz.home}/log/{pico}_{workflow}.log
log4j.appender.a.layout=com.digitalroute.apl.log.JsonLayout
log4j.appender.a.layout.MdcFieldsToLog=pico, workflow, agent, tag
---------------------------------------------

The refresh interval is set to 1000 ms by default. You can change this value by setting the platform property mz.logging.refreshinterval.

When you activate a configuration the contents of the corresponding file is copied to <ec name>-apl-log4j.properties. Any changes in this file will become effective in the next watch interval. For more information about configuring log4j APL logging, see 10. log4j APL Logging Configurations in the System Administrator's Guide.

Return Codes
Listed below are the different return codes for the apl-loglevel command:

CodeDescription

0

Will be returned if the command was successful.

1

Will be returned if the command was unsuccessful.