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

org.smallmind.scribe.pen.test-logging.xml Maven / Gradle / Ivy

There is a newer version: 6.2.0
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns="http://www.springframework.org/schema/beans"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

  <!-- Logging Templates -->
  <bean id="defaultTemplate" class="org.smallmind.scribe.pen.DefaultTemplate" init-method="register">
    <property name="autoFillLoggerContext" value="true"/>
    <property name="appenders">
      <list>
        <ref bean="consoleAppender"/>
      </list>
    </property>
    <property name="level" value="${log.default.level}"/>
  </bean>

  <bean id="dynamicTemplate" class="org.smallmind.scribe.pen.spring.DynamicClassNameTemplateInitializingBean">
    <property name="autoFillLoggerContext" value="true"/>
    <property name="appenders">
      <list>
        <ref bean="consoleAppender"/>
      </list>
    </property>
  </bean>

  <!-- Logging Framework Setup -->

  <bean id="fullTimestamp" class="org.smallmind.scribe.pen.DateFormatTimestamp">
    <property name="dateFormat">
      <bean class="java.text.SimpleDateFormat">
        <constructor-arg index="0" value="yyyy-MM-dd'T'HH:mm:ss.SSSZ"/>
      </bean>
    </property>
  </bean>

  <bean id="patternFormatter" class="org.smallmind.scribe.pen.PatternFormatter">
    <property name="timestamp" ref="fullTimestamp"/>
    <property name="format" value="%d %n %+5l (%F.%M:%L) [%T] - %m%!+\n\t!p%!+\n\t!s"/>
  </bean>

  <bean id="consoleAppender" class="org.smallmind.scribe.pen.ConsoleAppender">
    <property name="formatter" ref="patternFormatter"/>
  </bean>

  <bean id="consoleErrorHandler" class="org.smallmind.scribe.pen.DefaultErrorHandler">
    <property name="backupAppender" ref="consoleAppender"/>
  </bean>
</beans>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy