Write logs to file, add color to Console logs, ignore logfiles from Git
This commit is contained in:
parent
5c83fff7bf
commit
89b5f0a169
2
src/java/rabbitmq-poc/.gitignore
vendored
2
src/java/rabbitmq-poc/.gitignore
vendored
@ -37,3 +37,5 @@ build/
|
|||||||
|
|
||||||
### Mac OS ###
|
### Mac OS ###
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
/logs
|
||||||
@ -8,10 +8,20 @@
|
|||||||
<Console name="STDOUT-NOCOLOR">
|
<Console name="STDOUT-NOCOLOR">
|
||||||
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} | %-5level | %-28c{1} - %msg [%t]%n"/>
|
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} | %-5level | %-28c{1} - %msg [%t]%n"/>
|
||||||
</Console>
|
</Console>
|
||||||
|
<RollingFile name="FILE-NOCOLOR"
|
||||||
|
fileName="logs/rabbitmq-poc.log"
|
||||||
|
filePattern="logs/rabbitmq-poc.log.%i.gz">
|
||||||
|
<DefaultRolloverStrategy max="100"/>
|
||||||
|
<Policies>
|
||||||
|
<SizeBasedTriggeringPolicy size="1M"/>
|
||||||
|
</Policies>
|
||||||
|
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} | %-5level | %-28c{1} - %msg [%t]%n"/>
|
||||||
|
</RollingFile>
|
||||||
</Appenders>
|
</Appenders>
|
||||||
<Loggers>
|
<Loggers>
|
||||||
<Root level="INFO">
|
<Root level="INFO">
|
||||||
<AppenderRef ref="STDOUT-NOCOLOR"/>
|
<AppenderRef ref="STDOUT-COLOR"/>
|
||||||
|
<AppenderRef ref="FILE-NOCOLOR"/>
|
||||||
</Root>
|
</Root>
|
||||||
</Loggers>
|
</Loggers>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user