<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How can I configure a separate log file for the runtime log?</title><link>https://answers.axonivy.com/questions/1852/how-can-i-configure-a-separate-log-file-for-the-runtime-log</link><description>&lt;p&gt;I would like to have two log files. One for he ivy system messages and one for the runtime log messages. How can I configure that?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1852/how-can-i-configure-a-separate-log-file-for-the-runtime-log" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 28 Jun 2016 15:31:50 -0400</lastBuildDate><item><title>Answer by Reto Weiss</title><link>https://answers.axonivy.com/questions/1852/how-can-i-configure-a-separate-log-file-for-the-runtime-log/1853</link><description>&lt;p&gt;Modify the file configuration/log4jconfig.xml as follows:&lt;/p&gt;
&lt;p&gt;Add a new file appender for the runtime log:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;   &amp;lt;appender name="RuntimeLog" class="org.apache.log4j.DailyRollingFileAppender"&amp;gt;
    &amp;lt;param name="Threshold" value="DEBUG"/&amp;gt;
    &amp;lt;param name="File" value="${user.dir}/logs/ivy.runtime.log"/&amp;gt;
    &amp;lt;param name="DatePattern" value="'.'yyyy-MM-dd"/&amp;gt;
    &amp;lt;layout class="org.apache.log4j.IvyLog4jLayout"&amp;gt;
      &amp;lt;param name="DateFormat" value="HH:mm:ss.SSS"/&amp;gt;
    &amp;lt;/layout&amp;gt;
   &amp;lt;/appender&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then add a new category for the runtime log with the additivity attribute set to false and referencing the RuntimeLog appender:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;category name="runtimelog" class="ch.ivyteam.log.Logger" additivity="false"&amp;gt;
    &amp;lt;priority value="DEBUG"/&amp;gt;
    &amp;lt;appender-ref ref="RuntimeLog"/&amp;gt;
  &amp;lt;/category&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Restart the engine.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reto Weiss</dc:creator><pubDate>Tue, 28 Jun 2016 15:31:50 -0400</pubDate><guid>https://answers.axonivy.com/questions/1852/how-can-i-configure-a-separate-log-file-for-the-runtime-log/1853</guid></item></channel></rss>