Set up logs to collect license information and debug information.
Before you begin
The adapter is installed.
About this task
To set up debug and user license logs, you can create a properties
file named
oslc_log4j.properties in the
JIRAInstallDir/conf directory.
Procedure
Create a file for debug and user license log properties.
- Create a file that is called oslc_log4j.properties in
the JIRAInstallDir/conf directory. For example,
c:\Program Files (x86)\Atlassian\JIRA\conf\oslc_log4j.properties

/opt/Atlassian/JIRA/conf/oslc_log4j.properties
- Add the following properties:
#####################################################
# LOG FILE LOCATIONS
#####################################################
log4j.appender.licenseappender=org.apache.log4j.rolling.RollingFileAppender
log4j.appender.licenseappender.File=${catalina.home}/logs/jira.license.csv
log4j.appender.licenseappender.RollingPolicy=org.apache.log4j.rolling.TimeBasedRollingPolicy
log4j.appender.licenseappender.RollingPolicy.FileNamePattern=${catalina.home}/logs/jira.license-%d{yyyy-MM-dd}.csv
log4j.appender.licenseappender.layout=com.ibm.oslc.cm.adaptor.jira.license.DefaultLayout
log4j.appender.console=org.apache.log4j.ConsoleAppender
#log4j.appender.console.Threshold=DEBUG
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
log4j.appender.filelog=org.apache.log4j.RollingFileAppender
log4j.appender.filelog.File=${catalina.home}/logs/oslc.log
log4j.appender.filelog.layout=org.apache.log4j.PatternLayout
log4j.appender.filelog.layout.ConversionPattern=%d{DATE} %5p %c{1}:%L - %m%n
#####################################################
# CLASS-SPECIFIC LOGGING LEVELS
#####################################################
# You might want to use these properties to debug.
# Using these properties can produce a large number of logs.
# Uncomment only the properties you want to use to debug.
log4j.logger.com.ibm.oslc.cm.adaptor.jira.license = INFO, licenseappender
log4j.additivity.com.ibm.oslc.cm.adaptor.jira.license = false
log4j.logger.com.ibm.oslc.cm.adaptor.jira = INFO, console, filelog
log4j.additivity.com.ibm.oslc.cm.adaptor.jira = false
log4j.logger.com.ibm.oslc.cm.adaptor.jira.services = INFO, console, filelog
log4j.additivity.com.ibm.oslc.cm.adaptor.jira.services = false
The oslc_log4j.properties file creates a
debug log file named oslc.log for the JIRA adapter
in the JIRAInstallDir\logs directory.
For example,
c:\Program Files (x86)\Atlassian\JIRA\logs\oslc.log
/opt/Atlassian/JIRA/logs/oslc.log
The oslc_log4j.properties file also creates
a license audit log file named jira.license*.csv for
the JIRA adapter in the JIRAInstallDir\logs directory.
For example,
c:\Program Files (x86)\Atlassian\JIRA\logs\jira.license.csv
c:\Program Files (x86)\Atlassian\JIRA\logs\jira.license-2013-04-25.csv
/opt/Atlassian/JIRA/logs/jira.license.csv
/opt/Atlassian/JIRA/logs/jira.license-2013-04-25.csv
Create another file for user license log properties.
- Create a file that is called oslc.properties in
the JIRAInstallDir/conf directory. For example,

c:\Program Files (x86)\Atlassian\JIRA\conf\oslc.properties
/opt/Atlassian/JIRA/conf/oslc.properties
- Add the following property:
License.TimeOut=30
This
property sets licenses to expire at 30 minutes, if the logged in user
does not do any actions to use that license.
- Restart the JIRA server for the changes to take effect.
Results
Logging for debug and user licenses is set up to use.
What to do next
View the results of the license logs, see
Tracking user-based licenses.