Skip to main content

How To Migrate the Ignition Loggers using Logback.XML

Comments

2 comments

  • Wesley Phan

    This code will give you a warning in the wrapper log, they have changed the trigger policy into a rolling Policy class now.

     <timeBasedFileNamingAndTriggeringPolicy
              class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">

    Here is the updated code with new policy.

    <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <!-- Sets policy for generating and deleting log files -->
      <fileNamePattern>${LOG_HOME}\\TagHistoryQuery.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
      <maxFileSize>10MB</maxFileSize> <!-- Max file size -->
      <maxHistory>10</maxHistory> <!-- Max 10 Days of History (Days is inferred from the value of fileNamePattern) -->
        <totalSizeCap>1GB</totalSizeCap> <!--Maximum sum of the log files' size -->
      </rollingPolicy>

    Chapter 4: Appenders (qos.ch)

    In versions prior to 1.1.7, this document mentioned a component called SizeAndTimeBasedFNATP. However, given that SizeAndTimeBasedFNATP offers a simpler configuration structure, we no longer document SizeAndTimeBasedFNATP. Nevertheless, earlier configuration files using SizeAndTimeBasedFNATP will continue to work just fine. In fact, SizeAndTimeBasedRollingPolicy is implemented with a SizeAndTimeBasedFNATP subcomponent.

    0
  • Steven Tat

    Hello Wesley, 

    Thank you for pointing that out. The article has been updated to reflect that more recent policy.

    1

Please sign in to leave a comment.

This article has 2 comments.