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?

asked 28.06.2016 at 15:28

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
4.9k182655
accept rate: 74%

edited 28.06.2016 at 15:33


Modify the file configuration/log4jconfig.xml as follows:

Add a new file appender for the runtime log:

   <appender name="RuntimeLog" class="org.apache.log4j.DailyRollingFileAppender">
    <param name="Threshold" value="DEBUG"/>
    <param name="File" value="${user.dir}/logs/ivy.runtime.log"/>
    <param name="DatePattern" value="'.'yyyy-MM-dd"/>
    <layout class="org.apache.log4j.IvyLog4jLayout">
      <param name="DateFormat" value="HH:mm:ss.SSS"/>
    </layout>
   </appender>

Then add a new category for the runtime log with the additivity attribute set to false and referencing the RuntimeLog appender:

  <category name="runtimelog" class="ch.ivyteam.log.Logger" additivity="false">
    <priority value="DEBUG"/>
    <appender-ref ref="RuntimeLog"/>
  </category>

Restart the engine.

link

answered 28.06.2016 at 15:31

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
4.9k182655
accept rate: 74%

edited 28.06.2016 at 15:32

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×25

Asked: 28.06.2016 at 15:28

Seen: 777 times

Last updated: 28.06.2016 at 15:33