-
Notifications
You must be signed in to change notification settings - Fork 6
/
log4j2.xml
34 lines (34 loc) · 1.46 KB
/
log4j2.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN"> <!-- Change this to WARN after initial testing -->
<Appenders>
<!--<Syslog name="test" format="RFC5424" host="host-address" port="the-Port"
protocol="TCP" appName="TaxiiClientBA" includeMDC="true" mdcId="mdc"
facility="LOCAL1" newLine="true"
>
<LoggerFields>
<KeyValuePair key="level" value="%level" />
</LoggerFields>
</Syslog>
-->
<RollingFile name="TaxiiClient" filename="./log/TaxiiClient-BA.log"
filePattern="log/TaxiiClient-BA.%i"> <!-- if we want we can put .gz or .zip on the end and the rolled files will automatically compress -->
<PatternLayout>
<Pattern>%date{ISO8601} ${hostName} %-5p - %m%n</Pattern>
</PatternLayout>
<Policies>
<!--<TimeBasedTriggeringPolicy /> now support time based rolling but I don't think it will auto delete older date files, only deletes based on the max # files which is within a date-->
<SizeBasedTriggeringPolicy size="100 MB" />
</Policies>
<DefaultRolloverStrategy max="10" />
</RollingFile> <Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level - %msg%n"/>
</Console>
</Appenders>
<Loggers>
<Root level="DEBUG">
<AppenderRef ref="Console" level="DEBUG"/>
<AppenderRef ref="TaxiiClient" level="DEBUG" />
<!-- AppenderRef ref="syslog" level="WARN" /-->
</Root>
</Loggers>
</Configuration>