All Downloads are FREE. Search and download functionalities are using the official Maven repository.

chapters.appenders.conf.logback-timestamp-contextBirth.xml Maven / Gradle / Ivy

<configuration>

  <!-- Insert the logger context bith date formatted as
       "yyyyMMdd'T'HHmmss" under the key "bySecond" into the logger
       context. This value will be available to all subsequent
       configuration elements. -->
  <timestamp key="bySecond" datePattern="yyyyMMdd'T'HHmmss" 
             timeReference="contextBirth"/>

  <appender name="FILE" class="ch.qos.logback.core.FileAppender">
    <!-- use the previously created timestamp to create a uniquely
         named log file -->
    <file>log-${bySecond}.txt</file>
    <encoder>
      <pattern>%logger{35} - %msg%n</pattern>
    </encoder>
  </appender>

  <root level="DEBUG">
    <appender-ref ref="FILE" />
  </root>
</configuration>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy