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
Setting Logging Level
Logging can use considerable CPU resources. Enable only significant log messages (
INFO and above) in a production environment.
FINEST 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 configuration without restarting Diffusion.
FINEST 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.
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>FINEST</level> <xml-format>false</xml-format> <file-limit>0</file-limit> <file-append>false</file-append> <file-count>1</file-count> </log>
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.
The credentials are as follows
- Username: guest
- Password: Guest
Press Connect Select Insecure Click the MBeans tab Open com.pushtechnology.diffusion > Logs > server > Attributes. Change the LogLevel value to
FINEST and press enter. The log level has now been set to
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.