-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Freund, Stephan
authored and
Freund, Stephan
committed
May 18, 2018
1 parent
1cbe1d6
commit 7ce2cdd
Showing
4 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | ||
<!-- | ||
############################################################################ | ||
## | ||
## This is the log configuration for production. | ||
## | ||
############################################################################ | ||
--> | ||
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true"> | ||
|
||
<!-- ==================================================================== | ||
application log | ||
==================================================================== --> | ||
<appender name="APPLICATION" class="org.apache.log4j.RollingFileAppender"> | ||
<param name="File" value="logs/app.log"/> | ||
<param name="Append" value="true"/> | ||
<param name="MaxFileSize" value="75MB"/> | ||
<param name="MaxBackupIndex" value="3"/> | ||
<layout class="org.apache.log4j.PatternLayout"> | ||
<param name="ConversionPattern" value="%5p [%t] (%F:%L) - %m%n"/> | ||
</layout> | ||
</appender> | ||
|
||
<appender name="FOO" class="org.apache.log4j.FileAppender"> | ||
<param name="File" value="logs/foo.log"/> | ||
<param name="Append" value="false"/> | ||
<param name="Threshold" value="ERROR" /> | ||
<layout class="org.apache.log4j.PatternLayout"> | ||
<param name="ConversionPattern" value="%m%n"/> | ||
</layout> | ||
</appender> | ||
|
||
<!-- ==================================================================== | ||
console log | ||
==================================================================== --> | ||
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> | ||
<layout class="org.apache.log4j.PatternLayout"> | ||
<param name="ConversionPattern" value="%p %t %c - %m%n"/> | ||
</layout> | ||
</appender> | ||
|
||
<!-- this is the logger for the converter package --> | ||
<logger name="farnetto.log4jconverter" additivity="false"> | ||
<level value="DEBUG"/> | ||
<appender-ref ref="APPLICATION" /> | ||
</logger> | ||
|
||
<!-- this is another oneline comment --> | ||
<logger name="farnetto"> | ||
<level value="WARN"/> | ||
</logger> | ||
|
||
<!-- ==================================================================== | ||
This is the root logger. | ||
==================================================================== --> | ||
<root> | ||
<level value="INFO"/> | ||
<appender-ref ref="CONSOLE"/> | ||
<appender-ref ref="APPLICATION"/> | ||
</root> | ||
|
||
</log4j:configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
############################################################################ | ||
## | ||
## This is the log configuration for production. | ||
## | ||
############################################################################ | ||
--> | ||
<Configuration status="debug"> | ||
|
||
<Appenders> | ||
|
||
<!-- ==================================================================== | ||
application log | ||
==================================================================== --> | ||
<RollingFile name="APPLICATION" fileName="logs/app.log"> | ||
<PatternLayout pattern="%5p [%t] (%F:%L) - %m%n"/> | ||
<Policies> | ||
<SizeBasedTriggeringPolicy size="75MB"/> | ||
</Policies> | ||
<DefaultRolloverStrategy max="3"/> | ||
</RollingFile> | ||
|
||
<File name="FOO" fileName="logs/foo.log" append="false"> | ||
<PatternLayout pattern="%m%n"/> | ||
<Filter type="ThresholdFilter" level="ERROR"/> | ||
</File> | ||
|
||
<!-- ==================================================================== | ||
console log | ||
==================================================================== --> | ||
<Console name="CONSOLE" target="STDOUT"> | ||
<PatternLayout pattern="%p %t %c - %m%n"/> | ||
</Console> | ||
|
||
</Appenders> | ||
|
||
<Loggers> | ||
|
||
<!-- this is the logger for the converter package --> | ||
<Logger name="farnetto.log4jconverter" level="DEBUG" additivity="false"> | ||
<AppenderRef ref="APPLICATION"/> | ||
</Logger> | ||
|
||
<!-- this is another oneline comment --> | ||
<Logger name="farnetto" level="WARN"/> | ||
|
||
<!-- ==================================================================== | ||
This is the root logger. | ||
==================================================================== --> | ||
<Root level="root.level"> | ||
<AppenderRef ref="CONSOLE"/> | ||
<AppenderRef ref="APPLICATION"/> | ||
</Root> | ||
|
||
</Loggers> | ||
|
||
</Configuration> |