BAEL-38 - Minor changes

This commit is contained in:
Slavisa Baeldung 2016-07-08 09:57:47 +02:00
parent 16295e6f7b
commit 1a11364e57
4 changed files with 32 additions and 42 deletions

View File

@ -29,31 +29,21 @@
<version>2.6</version> <version>2.6</version>
</dependency> </dependency>
<!--disruptor for log4j2 async logging--> <!--disruptor for log4j2 async logging-->
<dependency> <dependency>
<groupId>com.lmax</groupId> <groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId> <artifactId>disruptor</artifactId>
<version>3.3.4</version> <version>3.3.4</version>
</dependency> </dependency>
<!--<dependency>-->
<!--<groupId>org.apache.logging.log4j</groupId>-->
<!--<artifactId>log4j-api</artifactId>-->
<!--<version>2.6</version>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>org.apache.logging.log4j</groupId>-->
<!--<artifactId>log4j-core</artifactId>-->
<!--<version>2.6</version>-->
<!--</dependency>-->
<!--logback dependencies--> <!--logback dependencies-->
<!--<dependency>--> <dependency>
<!--<groupId>ch.qos.logback</groupId>--> <groupId>ch.qos.logback</groupId>
<!--<artifactId>logback-classic</artifactId>--> <artifactId>logback-classic</artifactId>
<!--<version>1.1.7</version>--> <version>1.1.7</version>
<!--</dependency>--> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>

View File

@ -14,7 +14,7 @@
<param name="append" value="false"/> <param name="append" value="false"/>
<layout class="org.apache.log4j.PatternLayout"> <layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %-5p %m%n"/> <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %-5p %m%n"/>
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %p %m%n" /> <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %p %m%n"/>
</layout> </layout>
</appender> </appender>

View File

@ -4,7 +4,7 @@
# Console appender # Console appender
<Console name="stdout" target="SYSTEM_OUT"> <Console name="stdout" target="SYSTEM_OUT">
# Pattern of log message for console appender # Pattern of log message for console appender
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} %p %m%n" /> <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} %p %m%n"/>
</Console> </Console>
# File appender # File appender
@ -19,7 +19,7 @@
<Logger name="com.baeldung.log4j2" level="TRACE"/> <Logger name="com.baeldung.log4j2" level="TRACE"/>
<AsyncRoot level="DEBUG"> <AsyncRoot level="DEBUG">
<AppenderRef ref="stdout" /> <AppenderRef ref="stdout"/>
<AppenderRef ref="fout"/> <AppenderRef ref="fout"/>
</AsyncRoot> </AsyncRoot>
</Loggers> </Loggers>

View File

@ -1,28 +1,28 @@
<configuration> <configuration>
# Console appender # Console appender
<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender"> <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout"> <layout class="ch.qos.logback.classic.PatternLayout">
# Pattern of log message for console appender # Pattern of log message for console appender
<Pattern>%d{yyyy-MM-dd HH:mm:ss} %p %m%n</Pattern> <Pattern>%d{yyyy-MM-dd HH:mm:ss} %p %m%n</Pattern>
</layout> </layout>
</appender> </appender>
# File appender # File appender
<appender name="fout" class="ch.qos.logback.core.FileAppender"> <appender name="fout" class="ch.qos.logback.core.FileAppender">
# Name of a log file # Name of a log file
<file>log4j/target/baeldung-logback.log</file> <file>log4j/target/baeldung-logback.log</file>
<append>false</append> <append>false</append>
<encoder> <encoder>
# Pattern of log message for file appender # Pattern of log message for file appender
<pattern>%d{yyyy-MM-dd HH:mm:ss} %p %m%n</pattern> <pattern>%d{yyyy-MM-dd HH:mm:ss} %p %m%n</pattern>
</encoder> </encoder>
</appender> </appender>
# Override log level for specified package # Override log level for specified package
<logger name="com.baeldung.logback" level="TRACE"/> <logger name="com.baeldung.logback" level="TRACE"/>
<root level="DEBUG"> <root level="DEBUG">
<appender-ref ref="stdout" /> <appender-ref ref="stdout"/>
<appender-ref ref="fout" /> <appender-ref ref="fout"/>
</root> </root>
</configuration> </configuration>