Created
December 2, 2021 20:36
-
-
Save sachsgit/e62f88c3dc0e480e0b70c2d7f5545a12 to your computer and use it in GitHub Desktop.
Log4j 2 Property XML File
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE log4j:configuration> | |
<Configuration status="WARN"> | |
<Appenders> | |
<File fileName="logs/InfoLogs.log" name="infoFile" append="false"> | |
<PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} | %c{1} %L - %msg%n" /> | |
</File> | |
<File fileName="logs/ErrorLogs.log" name="errorFile" append="false"> | |
<PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} | %c{1} %l - %msg%n" /> | |
</File> | |
<Console name="STDOUT" target="SYSTEM_OUT"> | |
<PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} | %c{1} %L - %msg%n" /> | |
</Console> | |
<Console name="STDERR" target="SYSTEM_ERR"> | |
<PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} | %c{1} %L - %msg%n" /> | |
</Console> | |
</Appenders> | |
<Loggers> | |
<Root level="DEBUG"> | |
<AppenderRef level="DEBUG" ref="infoFile" /> | |
<AppenderRef level="ERROR" ref="errorFile" /> | |
<AppenderRef level="DEBUG" ref="STDOUT" /> | |
</Root> | |
</Loggers> | |
</Configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment