Skip to content

Commit 3f30bad

Browse files
committed
fix logging, to send error logs to stderr
1 parent f09f61e commit 3f30bad

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>simple-spreadsheet-extractor</artifactId>
66
<name>POI Based Spreadsheet parser</name>
77
<description>Simple command line app that translates a Spreadsheet file to an XML document</description>
8-
<version>0.18.0</version>
8+
<version>0.18.1</version>
99
<dependencies>
1010
<dependency>
1111
<groupId>org.apache.poi</groupId>

src/main/resources/log4j.properties

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/main/resources/log4j2.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Configuration>
3+
<Properties>
4+
<Property name="pattern">
5+
[%d{yyyy-MM-dd HH:mm:ss.SSS}][%highlight{%-5level}][%t][%logger] %msg%n
6+
</Property>
7+
</Properties>
8+
<Appenders>
9+
<Console name="stdout" target="SYSTEM_OUT">
10+
<PatternLayout pattern="${pattern}"/>
11+
<ThresholdFilter level="ERROR" onMatch="DENY" onMismatch="ACCEPT"/>
12+
</Console>
13+
<Console name="stderr" target="SYSTEM_ERR"> <!-- 2 -->
14+
<PatternLayout pattern="${pattern}"/>
15+
<ThresholdFilter level="ERROR" onMatch="ACCEPT" onMismatch="DENY"/>
16+
</Console>
17+
</Appenders>
18+
<Loggers>
19+
<Root level="ERROR">
20+
<AppenderRef ref="stdout"/>
21+
<AppenderRef ref="stderr"/>
22+
</Root>
23+
</Loggers>
24+
</Configuration>

0 commit comments

Comments
 (0)