We are currently performing maintenance on Appian Community. As a result, discussions posts and replies are temporarily unavailable. We appreciate your patience.

Write Plugin Logs to Custom File

Certified Senior Developer

For a custom plugin file, I need to write logs to a separate log file and not to the application-server.log /server.log.
In my appian_log4j.properties file I have made the following entries:

#### custom log entry
log4j.logger.com.<mypackage>=DEBUG,CUSTOM_LOG

###### CUSTOM_LOG file appender
log4j.appender.CUSTOM_LOG=org.apache.log4j.RollingFileAppender
log4j.appender.CUSTOM_LOG.layout=org.apache.log4j.PatternLayout
log4j.appender.CUSTOM_LOG.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
log4j.appender.CUSTOM_LOG.File=${AE_LOGS}/customLog.log
log4j.appender.CUSTOM_LOG.MaxFileSize=10MB
log4j.appender.CUSTOM_LOG.MaxBackupIndex=1000
log4j.appender.CUSTOM_LOG.encoding=UTF-8

The problem is that my plugin's loggers are still getting logged in the application-server.log and not creating a new file "customLog.log".
Could someone point to what am I missing?

Thanks.

OriginalPostID-156855

OriginalPostID-156855

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data