Last active
August 14, 2021 15:52
-
-
Save NisugaJ/39b11b75b1107b74abe860d66c1c96b8 to your computer and use it in GitHub Desktop.
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
<Configuration status="debug" name="your-project" packages=""> | |
<Appenders> | |
<!-- Console logging --> | |
<Console name="stdout" target="SYSTEM_OUT"> | |
<!-- Console logging pattern --> | |
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} %p %m%n"/> | |
</Console> | |
<!-- Rolling file logging with a new folder for each new month --> | |
<RollingFile | |
name="RollingFile" | |
fileName="/var/log/your-project/logs/logger.log" | |
filePattern="/var/log/your-project/logs/$${date:yyyy-MM}/logger-%d{-dd-MMMM-yyyy}-%i.log.gz" | |
> | |
<PatternLayout> | |
<!-- RollingFile logging pattern --> | |
<pattern>%d %p %C{1.} [%t] %m%n</pattern> | |
</PatternLayout> | |
<Policies> | |
<!-- Enable RollingFile logging at application startp --> | |
<OnStartupTriggeringPolicy /> | |
<!-- Maximum size constraint --> | |
<SizeBasedTriggeringPolicy size="10 MB" /> | |
</Policies> | |
</RollingFile> | |
</Appenders> | |
<Loggers> | |
<Root level="all"> | |
<AppenderRef ref="stdout" /> | |
<AppenderRef ref="RollingFile"/> | |
</Root> | |
</Loggers> | |
</Configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment