<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>KB-1120 How to create custom log files in Appian</title><link>https://community.appian.com/support/w/kb/342/kb-1120-how-to-create-custom-log-files-in-appian</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>KB-1120 How to create custom log files in Appian</title><link>https://community.appian.com/support/w/kb/342/kb-1120-how-to-create-custom-log-files-in-appian</link><pubDate>Thu, 10 Jun 2021 16:25:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:981eb382-9f86-492a-8fbf-7426dc165c25</guid><dc:creator>Nicholas Van Dyke</dc:creator><comments>https://community.appian.com/support/w/kb/342/kb-1120-how-to-create-custom-log-files-in-appian#comments</comments><description>Current Revision posted to Appian Knowledge Base by Nicholas Van Dyke on 6/10/2021 4:25:33 PM&lt;br /&gt;
&lt;div class="row content_container"&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;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 issue or logs containing sensitive data are required.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;To enable logging for the custom log:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the&amp;nbsp;&lt;strong&gt;appian_log4j&lt;/strong&gt;&lt;strong&gt;.properties&lt;/strong&gt;&amp;nbsp;file. For Appian 18.3 and later, this file can be found in&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/deployment/web.war/WEB-INF/resources&lt;/code&gt;. For Appian 18.2 and earlier, this file can be found in&amp;nbsp;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/ear/suite.ear/resources&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Add the following lines to the end of the file:&lt;br /&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;pre&gt;########### Custom Appenders 
log4j.logger.&amp;lt;JAVA_CLASS_NAME&amp;gt;=DEBUG, CUSTOM_LOGGING
log4j.additivity.&amp;lt;JAVA_CLASS_NAME&amp;gt;=false&lt;br /&gt;
###### 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
&lt;/pre&gt;
&lt;/div&gt;
&lt;strong&gt;Note:&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;In order to include the above logs in the default application server logs, change the value of&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;log4j.additivity.&amp;lt;JAVA_CLASS_NAME&amp;gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;to true.&lt;/li&gt;
&lt;li&gt;Save the changes and wait for 2-3 minutes for&amp;nbsp;them to be picked up by the application server.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To disable logging for the custom log:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;Return to the&amp;nbsp;&lt;/span&gt;&lt;strong&gt;appian_log4j.properties&lt;/strong&gt;&lt;span&gt;&amp;nbsp;file, and update the lines modified so that the value of&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;log4j.logger.&amp;lt;JAVA_CLASS_NAME&amp;gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;is changed to&lt;/span&gt;&amp;nbsp;to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;OFF, CUSTOM_LOGGING&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Save the file and check the&amp;nbsp;custom log to verify that entries are no longer being recorded.&lt;br /&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;span&gt; Do not completely remove the lines in order to disable the logging.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="affected-versions"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to all versions of Appian.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Last Reviewed:&amp;nbsp;June 2021&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: logging, administration, how-to&lt;/div&gt;
</description></item><item><title>KB-1120 How to create custom log files in Appian</title><link>https://community.appian.com/support/w/kb/342/kb-1120-how-to-create-custom-log-files-in-appian/revision/1</link><pubDate>Fri, 24 Feb 2017 13:41:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:981eb382-9f86-492a-8fbf-7426dc165c25</guid><dc:creator>Nick Vigilante</dc:creator><comments>https://community.appian.com/support/w/kb/342/kb-1120-how-to-create-custom-log-files-in-appian#comments</comments><description>Revision 1 posted to Appian Knowledge Base by Nick Vigilante on 2/24/2017 1:41:41 PM&lt;br /&gt;
&lt;div class="row content_container"&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;On the application server machine, open &lt;strong&gt;/ear/suite.ear/resources/appian_log4j.properties&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Add the following lines to the end of the file:&lt;br /&gt;
&lt;pre&gt;########### Custom Appenders 
log4j.logger.=DEBUG, CUSTOM_LOGGING
log4j.additivity.=false&lt;br /&gt;
###### 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
&lt;/pre&gt;
&lt;strong&gt;Note:&lt;/strong&gt; In order to include the above logs in the default application server logs, change the value of &lt;code&gt;log4j.additivity.&amp;lt;JAVA_CLASS_NAME&amp;gt;&lt;/code&gt; to true.&lt;/li&gt;
&lt;li&gt;Save the changes, and wait for 2-3 minutes for the changes to be picked up by the application server.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To disable these logs, update the &lt;code&gt;log4j.logger.&amp;lt;JAVA_CLASS_NAME&amp;gt;&lt;/code&gt; line to &lt;code&gt;OFF, CUSTOM_LOGGING&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;log4j.logger.&amp;lt;JAVA_CLASS_NAME&amp;gt; line to OFF, CUSTOM_LOGGING
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Wait for 2-3 minutes for the changes to applied again.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Completely removing the lines in order to disable the logging is not recommended.&lt;/p&gt;
&lt;h2 id="affected-versions"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to all versions of Appian.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Last Reviewed:&amp;nbsp;February 2017&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: logging, administration, how-to&lt;/div&gt;
</description></item></channel></rss>