Logs at DEBUG

Diffusion 5.9 Diffusion 6.0 Diffusion 6.1 Diffusion 6.2 Diffusion 6.3 Diffusion 6.4 Diffusion 6.5 Diffusion 6.6

The following article is provided on an advice basis only. This article references 3rd party software that may require licensing. The Diffusion™server creates a log about its activities and any problems that occur. Log messages are written to the console (the process output, which can appear in a terminal window) and to a log file. The level of logging performed by Diffusion can be adjusted, from a moderate rate of messages under normal circumstances for system monitoring, to very detailed logging for problem diagnosis. When debugging an issue with Diffusion, logs are almost always required at DEBUG level.

Setting Logging Level

Logging can use considerable CPU resources. Enable only significant log messages (INFO and above) in a production environment. DEBUG should only be used for debugging purposes. Every effort should be made to reproduce the issue in a test environment to minimize the risk of service interruption (see JConsole configuration to update the configuration without restarting Diffusion. DEBUG log files can be very large. We recommended that you compress these files before sending them to Push Technology Support. XML Configuration/ It is possible to change the logging level of your Diffusion server by modifying the XML configuration files.

Warning: The modifications to the XML configuration files require Diffusion to be restarted to take effect. To avoid restarting Diffusion follow the JConsole guide below.

Prior to Diffusion 6.4 version, The logging configuration file is located at etc/Logs.xml . There are many settings available for configuration. However, in this scenario the only setting which needs to be changed is the level element within the server log element.

<log name="server">
 <log-directory>logs</log-directory>
 <file-pattern>%s.log</file-pattern>
 <level>DEBUG/level>
 <xml-format>false</xml-format>
 <file-limit>0</file-limit>
 <file-append>false</file-append>
 <file-count>1</file-count>
</log>

From Diffusion version 6.4 onwards, the logging configuration file is located at etc/log4j2.xml . There are many settings available for configuration. However, in this scenario the only setting which needs to be changed is the AsyncRoot level element within the Loggers element.

<Loggers>
        <AsyncRoot level="DEBUG" includeLocation="false">
            <AppenderRef ref="console" />
            <AppenderRef ref="file" />
        </AsyncRoot>
 </Loggers>

JConsole Configuration

The JConsole graphical user interface is a monitoring tool that complies to the Java Management Extensions (JMX) specification. JConsole uses the instrumentation of the Java Virtual Machine (Java VM) to provide information about the performance and resource consumption of applications running on the Java platform. It can also be used to modify the configuration of Java applications at runtime – this is the feature that is most useful in regards to changing logging level. Load JConsole. JConsole is located at the following path:

  • JDK_HOME/bin - Where JDK_HOME is the directory in which the Java Development Kit (JDK) is installed.

If this directory is in your system path, you can start JConsole by simply typing jconsole in a command prompt or terminal.   If Diffusion is running locally, choose Diffusion in the list of local processes and click connect. If Diffusion is running on a remote machine, select ‘Remote Process’ and enter the following into the hostname and port textbox.

ip:1099

The credentials are as follows

  • Username: guest
  • Password: Guest

Press Connect

Logs at DEBUG_image_1

Select Insecure or Insecure Connection depending on the Diffusion version. 

Logs at DEBUG_image_2

If you are running Diffusion version 6.3 or lower, click the MBeans tab. Expand com.pushtechnology.diffusion > Logs > server > Attributes. 

Logs at DEBUG_image_3

Change the LogLevel value to DEBUG and press enter. The log level has now been set to DEBUG.

If you are running Diffusion version 6.4 or higher, click the MBeans tab. Expand org.apache.logging,log4j2 >  2aae9190 (ObjectName) > Loggers > image.png(ObjectName) > Attributes.

IMAGE

Change the Level value to DEBUG and click Refresh. The log level has now been set to DEBUG.

Sending to Support

The log files can be found in the /logs directory. If log rotation is not enabled the log file will be called Server.log If it is enabled the latest log file will be called Server.log.0 Please do not paste your logs (or snippets of them) into your email to Push Technology Support. Please save them in a separate file, then compress and attach to your email. If the size of your log file is too large to send by email, contact support who will make alternatives to receive the file.