You are currently reviewing an older revision of this page.
This article outlines the process to create a custom log file in Appian. The custom file can have logs from specific Java classes which may or may not be included in the application server logs. This will help if troubleshooting a specific issues or logs containing sensitive data is required.
This can be achieved by using custom appenders in log4j that control specific classes to generate logs. These appenders can be used to write logs to a new file and can also remove them from application server logs. Please follow the steps as described below:
########### Custom Appenders log4j.logger.=DEBUG, CUSTOM_LOGGING log4j.additivity.=false ###### Custom Logging file appender log4j.appender.CUSTOM_LOGGING=org.apache.log4j.RollingFileAppender log4j.appender.CUSTOM_LOGGING.layout=org.apache.log4j.PatternLayout log4j.appender.CUSTOM_LOGGING.layout.ConversionPattern=%d [%t] %-5p %c - %m%n log4j.appender.CUSTOM_LOGGING.File=${AE_LOGS}/.log log4j.appender.CUSTOM_LOGGING.MaxFileSize=10MB log4j.appender.CUSTOM_LOGGING.MaxBackupIndex=1000 log4j.appender.CUSTOM_LOGGING.encoding=UTF-8
log4j.additivity.<JAVA_CLASS_NAME>
To disable these logs, update the log4j.logger.<JAVA_CLASS_NAME> line to OFF, CUSTOM_LOGGING:
log4j.logger.<JAVA_CLASS_NAME>
OFF, CUSTOM_LOGGING
log4j.logger.<JAVA_CLASS_NAME> line to OFF, CUSTOM_LOGGING
Wait for 2-3 minutes for the changes to applied again.
Note: Completely removing the lines in order to disable the logging is not recommended.
This article applies to all versions of Appian.
Last Reviewed: February 2017