Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
150 views

Log4J For Logging The Data in Java Palletes of BWS.: Steps

1. To log data from Java palettes in BWs, add log4j entries to the log4j.properties file specifying the logger name, appender, file path and location, and layout. 2. In the Java palette, instantiate the logger object using the name from log4j.properties and use logging methods like debug, info, error to write to the log file. 3. For Unix, configure the log file path and complete the first step before deploying the engine.

Uploaded by

RameshCh
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
150 views

Log4J For Logging The Data in Java Palletes of BWS.: Steps

1. To log data from Java palettes in BWs, add log4j entries to the log4j.properties file specifying the logger name, appender, file path and location, and layout. 2. In the Java palette, instantiate the logger object using the name from log4j.properties and use logging methods like debug, info, error to write to the log file. 3. For Unix, configure the log file path and complete the first step before deploying the engine.

Uploaded by

RameshCh
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Log4j for logging the Data in Java Palletes of BWs.

STEPS
1. For Each BW Interface, add an entry in the log4j.properties file as mentioned
below. (Path:: <tibco-home>\bw\5.2\lib\log4j.properties)
log4j.logger.TESTLogger=DEBUG, TEST
log4j.appender.TEST=org.apache.log4j.RollingFileAppender
log4j.appender.TEST.File=C:\\BPM \\TEST_Logger.log
log4j.appender.TEST.MaxFileSize=100MB
log4j.appender.TEST.MaxBackupIndex=5
log4j.appender.TEST.layout=org.apache.log4j.PatternLayout
log4j.appender.TEST.layout.ConversionPattern= %-5p %c - %m%n
2. In the Java Pallete, Instantiate the Logger Object first and then use the required
level of logging methods to log the data into the above mentioned log file.
LoggerName shall be the Global Variable containing the name of the logger
given in the properties file.For the above case it is TESTLogger
Instantiation:
org.apache.log4j.Logger logger =
org.apache.log4j.Logger.getLogger(LoggerName);
Logging Methods
logger.debug(xxx..)
logger.info(yyyy..)
logger.error(zzza..)
logger.warn(adfa..)
Note:
In Unix Server , do the first step before deploying the Engine in Admin.
The path in unix env for the
log4j.appender.TEST.File=$HOME/BPM_JAVA_LOGS/TEST_Logger.log

You might also like