Log4j2_audit.xml
Easit GO uses the Apache Log4j version 2 framework for its audit logging. By default Easit GO looks for a file named log4j2_audit.xml in the config directory, if no such file is found Easit GO will not do any audit logging. Feel free to copy and use this example if you need to.
This configuration will rotate the log files when the reach a size of 100 Mb and keep the log files for 180 days.
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 | <?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Properties>
<Property name="default-log-pattern">%d{yyyy-MM-dd HH:mm:ss.SSS}{CET}|%map{sessionId}|%map{ip}|%map{username}|%map{userId}|%map{type}|%map{formattedMessage}|%map{exportedEntity}%n</Property>
<Property name="default-max-log-file-size">100 MB</Property>
<Property name="default-max-log-age">180</Property>
<Property name="default-log-dir">${sys:bpeLogsPath}/audit</Property>
<Property name="default-log-name">EasitGO-Audit</Property>
</Properties>
<Appenders>
<RollingFile name="ROLLINGZIP" fileName="${default-log-dir}/${default-log-name}.log"
filePattern="${default-log-dir}/${default-log-name}-%d{yyyy-MM-dd_HHmmss_SSS}.log.zip">
<PatternLayout pattern="${default-log-pattern}" charset="UTF-8"/>
<Policies>
<SizeBasedTriggeringPolicy size="${default-max-log-file-size}" />
</Policies>
<DefaultRolloverStrategy>
<Delete basePath="${default-log-dir}" maxDepth="1">
<IfLastModified age="P${default-max-log-age}D" />
</Delete>
</DefaultRolloverStrategy>
</RollingFile>
</Appenders>
<Loggers>
<Root level="INFO">
<AppenderRef ref="ROLLINGZIP" />
</Root>
</Loggers>
</Configuration>
|