[EXCONTRANS-201] Logging - Adapter Logs - ability for connector to generate its own log on the CMS and set log levels Created: 09/May/18  Updated: 20/Jul/18  Resolved: 14/May/18

Status: Closed
Project: Content Translation Extended (CTX)
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 2.0

Type: Task Priority: Neutral
Reporter: Trung Luu Assignee: Le Hai Thanh
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 0.5d
Original Estimate: 3.5d

Attachments: XML File log4j2.xml    
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Sprint: Scrum Sprint 8

 Description   

Case 1: print log for the whole package to current log files (such as debug level)

  • Solution: Using Tools > Log Tools > Log Levels to configure log level for package info.magnolia.translation.ex

 

Case 2: print log for the whole package to separate log file

  • Add below configuration to Appenders of log4j2.xml
<RollingFile name="sync-log-translation-extended"
             fileName="${magnolia.logs.dir}/magnolia-translation-extended.log"
             filePattern="${magnolia.logs.dir}/magnolia-translation-extended-%i.log"
             append="true">
  <PatternLayout pattern="%d{dd.MM.yyyy HH:mm:ss}%m%n"/>
  <Policies>
    <SizeBasedTriggeringPolicy size="1MB"/>
  </Policies>
  <DefaultRolloverStrategy max="5"/>
</RollingFile>
<Async name="log-translation-extended">
  <AppenderRef ref="sync-log-translation-extended"/>
</Async>
  • Add below configuration to Loggers of log4j.xml
<Logger name="info.magnolia.translation.ext" additivity="true" level="DEBUG">
  <AppenderRef ref="log-translation-extended"/>
</Logger>
  • Using Tools > Log Tools > Log Levels to configure log level for package info.magnolia.translation.ex

 

 

 


Generated at Mon Feb 12 00:28:54 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.