...
Changes to the Log4j2 configuration are applied within 60s and do not require the JS7 component to be restarted.
Anchor |
---|
| log_level_controller |
---|
| log_level_controller |
---|
|
Anchor |
---|
| log_level_agent |
---|
| log_level_agent |
---|
|
Controller and Agent Log4J2 Configuration Code Block |
---|
language | xml |
---|
title | Controller log4j2.xml |
---|
linenumbers | true |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="WARN" shutdownHook="disable">
<Properties>
<Property name="TimeZone">${env:JS7_CONTROLLER_TZ:-Etc/UTC}</Property>
<Property name="LogDir">${env:JS7_CONTROLLER_LOGS:-logs}</Property>
<Property name="LogBasename">${env:JS7_CONTROLLER_APPNAME:-controller}</Property>
<Property name="RetainDays">30d</Property>
<Property name="MaxSizeOfRolledOverFiles">5 GB</Property>
<Property name="MaxSizePerFile">100 MB</Property>
<!-- Log level of the Root Logger. -->
<Property name="RootLogLevel">INFO</Property>
<!-- Configuration for a 2nd debug log file (OFF|DEBUG|TRACE)
If this value is set to DEBUG or TRACE then the above
RootLogLevel has to have the same value.
-->
<Property name="LogLevelOfDebugLog">OFF</Property>
</Properties>
...
<Configuration>
|
...
- The Log4j2 configuration file is the same for Controllers and Agents except for the fact that environment variables in lines 4-6 for Agents use:
<Property name="TimeZone">${env:JS7_AGENT_TZ:-Etc/UTC}</Property>
<Property name="LogDir">${env:JS7_AGENT_LOGS:-logs}</Property>
<Property name="LogBasename">${env:JS7_AGENT_APPNAME:-agent}</Property>
- To enable debug mode modify
<property name="RootLogLevel">INFO</property>
and <property name="LogLevelOfDebugLog">OFF</property>
to DEBUG.
Anchor |
---|
| log_level_joc |
---|
| log_level_joc |
---|
|
JOC Cockpit Log4j2 Configuration Code Block |
---|
language | xml |
---|
title | JOC Cockpit log4j2.xml |
---|
linenumbers | true |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Properties>
<Property name="TimeZone">Etc/UTC</Property>
<Property name="RetainDays">30d</Property>
<Property name="MaxSizeOfRolledOverFiles">5 GB</Property>
<Property name="MaxSizePerFile">100 MB</Property>
<!-- Log level of the Root Logger. -->
<Property name="RootLogLevel">INFO</Property>
<!-- Configurations for 2nd debug log files (OFF|DEBUG|TRACE)
If one of these values is set to DEBUG or TRACE then the above
RootLogLevel has to have the same value.
-->
<Property name="JocLogLevel">OFF</Property>
<Property name="ServiceClusterLogLevel">OFF</Property>
<Property name="ServiceHistoryLogLevel">OFF</Property>
<Property name="ServiceDailyPlanLogLevel">OFF</Property>
<Property name="ServiceCleanupLogLevel">OFF</Property>
<Property name="ServiceMonitorLogLevel">OFF</Property>
<Property name="AuthLogLevel">OFF</Property>
<Property name="ConnectionPoolLogLevel">OFF</Property>
</Properties>
...
<Configuration>
|
...
Applying debug options requires the JS7 component in question to be restarted.
Anchor |
---|
| debug_controller |
---|
| debug_controller |
---|
|
Applying Debug Options to Controller and AgentThe below examples make use of the -Djavax.net.debug=ssl
Java option that is used to receive detailed information e.g. about TLS/SSL certificate handling. However, any Java options can be forwarded like this.
...
From the Windows command line or from the Controller instance start script controller_<instance>.cmd
:
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
@rem Alternatively set debug options when running the Controller start script
.\controller.cmd start --java-options="-Djavax.net.debug=ssl"
@rem For use with a Controller Windows Service add this line to the Controller instance start script controller_<instance>.cmd
set JAVA_OPTIONS="-Djavax.net.debug=ssl" |
From the Windows command line or from the Agent instance start script agent_4445.cmd
(assuming that port 4445
is used for the Agent):
Code Block |
---|
language | bash |
---|
title | Windows example to run the Agent instance start script with debug options |
---|
|
@rem Set debug options before running the Agent start script frm the command line
set JAVA_OPTIONS="-Djavax.net.debug=ssl"
.\agent.cmd start
@rem Alternatively set debug options when running the Agent start script
.\agent.cmd start --java-options="-Djavax.net.debug=ssl"
@rem For use with an Agent Windows Service add this line to the Agent instance start script agent_<port>.cmd
set JAVA_OPTIONS="-Djavax.net.debug=ssl" |
- Alternatively, when operating the Controller or Agent as a Windows Service then from the .
\service
directory of the installation run
- for a Controller:
js7_controller_<controller-id>w.exe
- where
<controller-id>
corresponds to the Controller ID the Controller has been installed for. - Example:
C:\Program Files\sos-berlin.com\js7\controller\my-controller\service\js7_controller_mycontrollerw.exe
- for an Agent:
js7_agent_<port>w.exe
- where
<port>
corresponds to the port that the Agent is operated for. - Example:
C:\Program Files\sos-berlin.com\js7\agent_4445\service\js7_agent_4445w.exe
- This brings up a utility that allows Java options to be specified:
- Note: The Controller or Agent Windows Service has to be restarted to apply changes to Java options.
Anchor |
---|
| debug_joc_cockpit |
---|
| debug_joc_cockpit |
---|
|
Applying Debug Options to JOC CockpitLog File
Output created from Java debug options is written to the stdout channel and therefore is added to the jetty.log
file in the JOC Cockpit's logs
directory, see JS7 - Log Files and Locations.
...