Created
March 31, 2024 12:15
-
-
Save lol97/b11b6ac8ae53eb903e320702c139ef29 to your computer and use it in GitHub Desktop.
simple log4j2 configuration xml
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Configuration status="INFO"> | |
<Appenders> | |
<Console name="Console" target="SYSTEM_OUT"> | |
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> | |
</Console> | |
<File name="MyFile" fileName="all.log" immediateFlush="false" append="false"> | |
<PatternLayout pattern="%d{yyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/> | |
</File> | |
</Appenders> | |
<Loggers> | |
<Root level="error"> | |
<AppenderRef ref="Console" /> | |
<AppenderRef ref="MyFile"/> | |
</Root> | |
</Loggers> | |
</Configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment