-
Notifications
You must be signed in to change notification settings - Fork 46
/
log4j2.xml
75 lines (71 loc) · 4.97 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="${sys:log4j2.level:-WARN}">
<Appenders>
<Elasticsearch name="${sys:smokeTest.appenderName:-elasticsearch-appender}">
<IndexName indexName="${sys:smokeTest.indexName:-log4j2-elasticsearch-jest}" />
<ThresholdFilter level="INFO" onMatch="ACCEPT"/>
<JacksonJsonLayout>
<VirtualProperty name="field1" value="$${ctx:ctxVariable:-}" dynamic="true" />
<VirtualProperty name="field2" value="$${env:envVariable:-}" />
<PooledItemSourceFactory poolName="itemPool"
itemSizeInBytes="${sys:smokeTest.initialItemBufferSizeInBytes:-1024}"
maxItemSizeInBytes="8192"
initialPoolSize="${sys:smokeTest.initialItemPoolSize:-40000}"
monitored="true"
monitorTaskInterval="10000"
resizeTimeout="500">
<UnlimitedResizePolicy resizeFactor="0.6" />
</PooledItemSourceFactory>
</JacksonJsonLayout>
<AsyncBatchDelivery batchSize="${sys:smokeTest.batchSize:-10000}"
deliveryInterval="5000" >
<ComponentTemplate name="${sys:smokeTest.indexName:-log4j2-elasticsearch-jest}-mappings" path="classpath:componentTemplate-7-mappings.json" />
<ComponentTemplate name="${sys:smokeTest.indexName:-log4j2-elasticsearch-jest}-settings" path="classpath:componentTemplate-7-settings.json" />
<ComponentTemplate name="${sys:smokeTest.indexName:-log4j2-elasticsearch-jest}-settings-ilm" path="classpath:componentTemplate-7-settings-ilm.json" />
<IndexTemplate name="${sys:smokeTest.indexName:-log4j2-elasticsearch-jest}" path="classpath:composableIndexTemplate-7.json" />
<ILMPolicy name="${sys:smokeTest.indexName:-log4j2-elasticsearch-jest}-ilm-policy" rolloverAlias="${sys:smokeTest.indexName:-log4j2-elasticsearch-jest}" path="classpath:ilmPolicy-7.json" />
<JestBufferedHttp serverUris="https://localhost:9200"
connTimeout="500"
readTimeout="30000"
maxTotalConnection="40"
defaultMaxTotalConnectionPerRoute="8">
<PooledItemSourceFactory poolName="batchPool"
itemSizeInBytes="5120000"
initialPoolSize="${sys:smokeTest.initialBatchPoolSize:-4}"
monitored="true"
monitorTaskInterval="10000"
resizeTimeout="500">
<UnlimitedResizePolicy resizeFactor="0.70" />
</PooledItemSourceFactory>
<BatchLimitBackoffPolicy maxBatchesInFlight="4" />
<XPackAuth>
<BasicCredentials username="admin" password="changeme" />
<!--<JKS keystorePath="${sys:jksCertInfo.keystorePath}"-->
<!--keystorePassword="${sys:jksCertInfo.keystorePassword}"-->
<!--truststorePath="${sys:jksCertInfo.truststorePath}"-->
<!--truststorePassword="${sys:jksCertInfo.truststorePassword}" />-->
<PEM keyPath="${sys:pemCertInfo.keyPath}"
keyPassphrase="${sys:pemCertInfo.keyPassphrase}"
clientCertPath="${sys:pemCertInfo.clientCertPath}"
caPath="${sys:pemCertInfo.caPath}" />
</XPackAuth>
</JestBufferedHttp>
<ChronicleMapRetryFailoverPolicy fileName="${sys:appenders.failover.chroniclemap.dir:-./}failedItems-log4j2-elasticsearch-jest.chronicleMap"
numberOfEntries="${sys:appenders.failover.chroniclemap.numberOfEntries:-1000000}"
averageValueSize="${sys:smokeTest.initialItemBufferSizeInBytes:-2048}"
batchSize="5000"
retryDelay="3000"
monitored="true"
monitorTaskInterval="30000">
<SingleKeySequenceSelector sequenceId="1"/>
</ChronicleMapRetryFailoverPolicy>
</AsyncBatchDelivery>
</Elasticsearch>
</Appenders>
<Loggers>
<AsyncLogger name="${sys:smokeTest.loggerName:-elasticsearch-logger}" level="info" additivity="false">
<AppenderRef ref="${sys:smokeTest.appenderName:-elasticsearch-appender}" />
</AsyncLogger>
<Root level="${sys:log4j2.level:-info}" />
</Loggers>
</Configuration>