Jump to content

custom java function is not working in rulefunction in TIBCO BE


bhaskar kanduri 2

Recommended Posts

Hi All, I have created a custom function for logging purpose using log4j in TIBCO BE, it is working fine when I used in a another java class, but it is not working when used in rule function,customfunction is invoked but the logging is not happending.My requirement is to write a specifc log to a file instead of using the defalut log. Please help to provide any inputs on this. Thank you.
Link to comment
Share on other sites

  • 7 months later...

Answer see KB:

https://support.tibco.com/s/article/Tibco-KnowledgeArticle-Article-36959

1). In the log4j.properties:

###################################

# to write to both custom log and BE log, you add "tibco_be_log" to log4j.logger.reportsLog

# to write to custom log only, you don't add "tibco_be_log"

log4j.logger.reportsLog=INFO, ats_log_file

log4j.appender.ats_log_file=org.apache.log4j.RollingFileAppender

log4j.appender.ats_log_file.File=c:/temp/my_log4j.log

log4j.appender.ats_log_file.MaxFileSize=500KB

log4j.appender.ats_log_file.MaxBackupIndex=2

log4j.appender.ats_log_file.layout=org.apache.log4j.PatternLayout

log4j.appender.ats_log_file.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

###################################

2). In the be-engine.tra file, add blow, pointing to your own log4j.properties

java.extended.properties -Dlog4j.configuration=file:///C:/be510/be/5.1/lib/log4j.properties

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...