[MGNLMIGRATION-228] Log migration report to text file or to catalina log Created: 25/Feb/13  Updated: 06/Mar/13  Resolved: 04/Mar/13

Status: Closed
Project: Migration 4.4 to 4.5 (closed)
Component/s: None
Affects Version/s: 1.2
Fix Version/s: 1.2.1

Type: Improvement Priority: Neutral
Reporter: Jaroslav Simak Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File log-migration    
Issue Links:
relation
Template:
Acceptance criteria:
Empty
Date of First Response:

 Comments   
Comment by Roman Kovařík [ 04/Mar/13 ]

Test output:
Migration 4.4.6 -> 4.5.8 migration log attached.

Comment by Roman Kovařík [ 04/Mar/13 ]

To append migration output to separate log file add this settings to WEB-INF/config/default/log4j.xml:
Or you can split the migration output log into more files according to the log level with the param Threshold (<param name="Threshold" value="DEBUG" />)

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
...
    <!-- migration -->	
    <appender name="sync-log-migration" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="${magnolia.logs.dir}/log-migration" />
    <param name="MaxFileSize" value="1MB" />
    <param name="MaxBackupIndex" value="5" />
    <param name="Append" value="true" />
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss}%m%n" />
    </layout>
  </appender>
  <appender name="log-migration" class="org.apache.log4j.AsyncAppender">
    <appender-ref ref="sync-log-migration" />
  </appender>

  <category name="info.magnolia.migration" additivity="true">
    <priority value="ALL" />
    <appender-ref ref="log-migration" />
  </category>
...
</log4j:configuration>
Generated at Mon Feb 12 10:18:23 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.