Debug Logging
Debug Logging provides detailed logs from the Intelligence Hub and libraries that support Log4j. Use Debug Logging in cases where detailed logs are required to troubleshoot an issue. For example, this may be an OPC UA connection issue where detailed logs could pinpoint the source of the problem.
Debug Logging should only be used intermittently when troubleshooting an issue. Using it continuously or in production is not recommended as it will impact performance given the large volumes of debug information.
To enable debug logging, enable the Debug Logging option on the Application Settings page. The options are listed from least log messages to most.
For example, Error
shows only error logs, Info
includes Error
and Warning
logs, and All
includes everything.
Enabling Debug Logging automatically updates the logback.xml
file in the runtime directory and beings logging to the runtime.debug.log
file in the runtime directory. To view the logs
click the Debug Log: View
link on the Settings page. From this view you can refresh to see the current logs, download the log file, and reset the logs. Reset deletes the current log file.
An example logback.xml file for logging Info
logs is provided below. Note the max size of the runtime.debug.log
is 64MB, at which point the log starts writing over the oldest records.
Changing the log level on the Settings page overwrites the logback.xml file and applies the new settings.
<configuration scan="true" scanPeriod="10 seconds">
<statusListener class="ch.qos.logback.core.status.NopStatusListener"/>
<appender name="ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>C:\source\intelligencehub_OLD\runtime/runtime.debug.log</file>
<append>false</append>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>C:\source\intelligencehub_OLD\runtime/runtime.debug.%i.zip</fileNamePattern>
<minIndex>0</minIndex>
<maxIndex>0</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>64MB</maxFileSize>
</triggeringPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-4relative [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="ROLLING"/>
</root>
</configuration>