Access Keys:
Skip to content (Access Key - 0)

Introduce


Debug Introduce


Introduce logs status and error messages via log4j. By default, these messages are written to the text file <introuce dir>/logs/introduce.log. Users of Introduce can edit the logging configuration to change the way Introduce displays and catalogs these debugging messages.

Configuring log4j

The logging configuration is controlled by the file <introduce dir>/conf/log4j.properties. The log4j.properties file defines two log appenders, which store the log messages:

log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout

log4j.appender.A2=org.apache.log4j.RollingFileAppender
log4j.appender.A2.MaxFileSize=10MB
log4j.appender.A2.MaxBackupIndex=1
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
log4j.appender.A2.File=./log/introduce.log

Log appender A1 will write messages to the console from which Introduce was started.

Log appender A2 is the default, and writes messages to a file. It is configured to allow the file to reach 10MB in size before creating a new log file.

The appender can be changed by editing the following section:

#set to A1 the default console logger if desired
#otherwise the rolling file logger is used
log4j.rootCategory=INFO, A2

Just change A2 on to A1, and the Console Appender will be used instead of the File Appender.

The rest of the properties file configures which level of log messages will be recorded for various Java packages.

# Display any warnings generated by core cagrid
log4j.category.gov.nih.nci.cagrid=DEBUG
log4j.category.org.cagrid=DEBUG

# Display full debug for introduce
log4j.category.gov.nih.nci.cagrid.introduce=DEBUG

By default, messages of DEBUG or higher priority will be recorded from the gov.nih.nci.cagrid and org.cagrid packages (as well as their sub-packages). Since DEBUG level produces a great deal of output, developers may want to change these levels to INFO or higher.

Last edited by
David Ervin (1145 days ago)
Adaptavist Theme Builder Powered by Atlassian Confluence