Collaborator server logs messages to several files.
|<Collaborator Server>/tomcat/logs/collab.log||Captures application level logging and (if enabled) license usage events, such as user login and logout. Configurable.|
|<Collaborator Server>/tomcat/logs/remoteSystem.log||Captures actions of remote repository integrations. Configurable.|
|<Collaborator Server>/tomcat/logs/remoteSystemAPI.log||Captures all outgoing API calls and usage statistics of API cache. Configurable.|
|<Collaborator Server>/output.log||Captures the standard out stream from the application libraries. Non-configurable.|
|<Collaborator Server>/error.log||Captures the standard error stream from the application libraries. Non-configurable.|
Normally, Collaborator does not write to standard out or error, but some of the libraries that it uses do. Occasionally, these logs could be helpful for debugging issues in one of those libraries.
Collaborator uses a sophisticated logging system, log4j, to manage the logging. Because of the breadth of configuration options available in log4j, it is not possible to document everything here (the log4j documentation is available at http://logging.apache.org/log4j/1.2/manual.html). However, in this section, we will cover some common scenarios.
The configuration file for the collab.log, remoteSystemAPI.log and remoteSystemAPI.log files can be found at <Collaborator Server>/tomcat/webapps/ROOT/WEB-INF/classes/log4j.properties. The file is a plain text Java properties file and can be edited with any text editor. Changes will take effect when the server is restarted.
|Changes applied to the log4j.properties file will not be saved between updates to Collaborator. Upon editing this file, it is a good idea to save a backup of the file in a location outside the Collaborator installation tree.|
The most common configuration change that system administrators will make is to turn on debug logging. This can be useful when working with the SmartBear technical support to resolve issues (though this is not always required). To enable debug logging, find the first non-comment line in the file:
This line configures the base level logging to the
info level and attaches an appender named
CodeCollaborator that will be configured later in the file. To enable debug logging, simply replace
debug and restart the server. Do not change the name of the appender as this will result in the log configuration not being available via JMX. Running a production system at debug logging level can cause performance issues, so it is not recommended unless specifically directed by the SmartBear technical support.
By default the collab.log file is rolled when it reaches 10 Mb and saves 10 generations of files, for a total of 110Mb of disk space potentially consumed. Both of these values can be configured in the log configuration file. The following lines specify these values:
System administrators may change these values as necessary to capture additional logging information or conserve disk space as necessary.
Collaborator can log license events (users logging in and out) to help you understand your license consumption. By default this is disabled, as it is normally not necessary. The system status page includes graphs which are helpful for understanding the total license consumption. However, drilling down to find what users are using the system when requires turning on license logging.
To enable license logging:
log4j.logger.com.smartbear.ccollab.license line and change the license logging level from "warn" to "debug":
The license log appender is also configured to roll like collab.log, and this configuration can be changed in a similar manner. However, it is important that you not change the appender name from
CodeCollaboratorLicense, as this will result in the log configuration not being available via JMX.
To diagnose issues with repository hosting integrations, you may enable detailed logging of remote repository actions and/or logging of outgoing API calls and usage statistics of API cache. By default those are disabled as it is normally not necessary.
To enable detailed logging of remote repository actions:
To enable logging of outgoing API calls and usage statistics of API cache:
log4j.logger.rsApiLog line and change the license logging level from "warn" to "debug":
If the Collaborator server has JMX management enabled, the logging level can be changed at runtime. All of the log configuration MBeans are available at com.smartbear.ccollab:/:Logging. Changing the
priority field value on
Application Logger or
License Logger will change the base level of logging for the application and the license log respectively.
You can find the appenders under the following names:
Application Log and
License Log. The max size, number of backups, and even the file names, can be changed in JMX. The changes will not take effect until the
activateOptions operation is invoked. In jconsole, operations are found in a separate tab.
|Changes applied with JMX do not persist across server restarts.|