Page History
Table of Contents |
---|
Scope
- By default JS7 components are configured to use log level INFO to limit disk space consumption.
- Higher log levels such as DEBUG and TRACE can be used to troubleshoot unexplained behavior.
Log Levels
Log levels can be modified in Log4j2 configuration files, see JS7 - Log Files and Locations.
Changes to the Log4j2 configuration are applied within 60s and do not require the JS7 component to be restarted.
Controller and Agent Log4J2 Configuration
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="WARN" shutdownHook="disable">
<properties>
<property name="LogLevel">INFO</property>
<Property name="RetainDays">30d</Property>
<Property name="MaxSizeOfRolledOverFiles">5GB</Property>
<Property name="MaxSizePerFile">100MB</Property>
</properties>
...
<Configuration>
|
Explanations:
- To enable debug mode modify
<property name="LogLevel">INFO</property>
toDEBUG
.
JOC Cockpit Log4j2 Configuration
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Properties>
<Property name="TimeZone">{Etc/UTC}</Property>
<Property name="RetainDays">30d</Property>
<Property name="NumOfFilesPerDay">5</Property>
<Property name="MaxSizePerFile">100MB</Property>
<!--Configuration for loggers of the web services in joc.log
Possibly values are ERROR, WARN, INFO, DEBUG, TRACE
Default: INFO
-->
<Property name="RootLogLevel">info</Property>
<!--Configuration for an extra database log file (database-debug.log) if necessary
OFF: without extra log
ERROR, WARN, INFO, DEBUG, TRACE: creates extra log with corresponding log level
SQL statement are included from DEBUG and their binding with TRACE
-->
<Property name="DatabaseLogLevel">off</Property>
<!--Configuration for an extra shiro log file (shiro.log) if necessary
OFF: without extra log
ERROR, WARN, INFO, DEBUG, TRACE: creates extra log with corresponding log level
SQL statement are included from DEBUG and their binding with TRACE
-->
<Property name="AuthLogLevel">off</Property>
</Properties>
...
<Configuration>
|
Explanations:
- To enable debug mode modify
<property name="RootLogLevel">INFO</property>
toDEBUG
. - Optionally, additional log files can be specified for database operations and authentication steps that receive the sam
- Modify
<Property name="DatabaseLogLevel">off</Property>
toON
. - Modify
<Property name="AuthLogLevel">off</Property>
toON
.
- Modify
Log Rotation Settings
When switching to higher log levels such as DEBUG, TRACE then consider increased disc space consumption.
By default JS7 components are configured to limit disk space consumption and to limit the retention period for log files. Consider instructions from the JS7 - Log Rotation article to adjust settings for the max. log file size and retention period.
Debug Options
Such options are applied for specific areas of interest and are forwarded by use of the JAVA_OPTIONS environment variable.
Applying debug options requires the respective JS7 component to be restarted.
Debug Options for Controller and Agent
- The JAVA_OPTIONS environment variable can be set before running the Controller or Agent start script. For
Code Block language bash title Windows example to run the Controller start script with debug options @rem Set debug options before running the Controller start script set JAVA_OPTIONS="-Djavax.net.debug=ssl" .\controller.cmd start --java-options="-Djavax.net.debug=ssl" @rem Alternatively set debug options when running the Controller start script .\controller.cmd start --java-options="-Djavax.net.debug=ssl"
Code Block language bash title Windows example to run the Agent start script with debug options @rem Set debug options before running the Agent start script set JAVA_OPTIONS="-Djavax.net.debug=ssl" .\agent.cmd start --java-options="-Djavax.net.debug=ssl" # Alternatively set debug options when running the Agent start script .\agent.cmd start --java-options="-Djavax.net.debug=ssl"
Code Block language bash title Unix example to run the Controller start script with debug options # Set debug options before running the Controller start script export JAVA_OPTIONS="-Djavax.net.debug=ssl" ./controller.sh start --java-options="-Djavax.net.debug=ssl" # Alternatively set debug options when running the Controller start script ./controller.sh start --java-options="-Djavax.net.debug=ssl"
Code Block language bash title Unix example to run the Agent start script with debug options # Set debug options before running the Agent start script export JAVA_OPTIONS="-Djavax.net.debug=ssl" ./agent.sh start --java-options="-Djavax.net.debug=ssl" # Alternatively set debug options when running the Agent start script ./agent.sh start --java-options="-Djavax.net.debug=ssl"
- xxx
Debug Options for JOC Cockpit
x