Enabling default logging

You can enable default logging for the command-line interface.

Set the environment variable scm_log to 1 to enable default logging for the command-line interface. The logs are located under USER_HOME/.jazz-scm/logs/. If the --config option is set, then the logs are under CONFIG_DIR/.jazz-scm/logs. The log rotation is set to 10 files with 5 megabytes each. You can also set log.level in USER_HOME/.jazz-scm/preference.properties to a required value and uncomment it.

The preference.properties file contains the following text:

Logging level.
This value is used only in case of default logging. 
The levels in descending order are:
SEVERE (highest value)
WARNING
INFO
CONFIG
FINE
FINER
FINEST (lowest value)
By default, logging level is set to severe. This is to done to avoid bloating the disk with logs.
# log.level: SEVERE

Log4j and Java util Logging for CLI

Set either of the following environment variables log4j_properties or java_util_logging to the path of the properties file. You can find a sample file for each of the logging methods below.

To enable log4j logging, in addition to specifying the log4j_properties environment variable, copy the org.apache.commons.logging.log4j fragment for the org.apache.commons.logging plug-in into the scmTools\eclipse\plugins directory.

The contents of the MANIFEST.MF and plugin.properties files for org.apache.commons.logging.log4j are described below.

Manifest-Version: 1.0
Bundle-Localization: OSGI-INF/l10n/plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Fragment-Host: org.apache.commons.logging
Bundle-Name: %bundle.name
Bundle-SymbolicName: org.apache.commons.logging.log4j
Bundle-Version: 1.0.1000.v20120402_2250
Import-Package: org.apache.log4j
Bundle-ManifestVersion: 2
###############################################################################
#Licensed Materials - Property of IBM
#(c) Copyright IBM Corporation 2008. All Rights Reserved.
#
#Note to U.S. Government Users Restricted Rights:  
#Use, duplication or disclosure restricted by GSA ADP Schedule 
#Contract with IBM Corp. 
###############################################################################
# NLS_ENCODING=UTF-8
# NLS_MESSAGEFORMAT_VAR

# META-INF/MANIFEST.MF
bundle.name = Log4j Fragment

video icon Video

Jazz.net channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community

Jazz.net
Jazz.net forums
Jazz.net library

support icon Support

IBM Support Community
Deployment wiki