org.smallmind.scribe.pen.test-logging.xml Maven / Gradle / Ivy
<?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>