mirror of https://github.com/hyperledger/besu
Add splunk logging (#725)
* Add splunk logging Co-Authored-By: Siegfried Puchbauer <siegfried.puchbauer@gmail.com> Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com> * Explicitly declare we rely on EPL 1.0 in our dependency to logback Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com> Co-authored-by: Siegfried Puchbauer <siegfried.puchbauer@gmail.com>pull/753/head
parent
8ededd7a35
commit
ef5a465d71
@ -1,16 +1,50 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<Configuration status="INFO"> |
||||
<Properties> |
||||
<Property name="root.log.level">INFO</Property> |
||||
<Property name="root.log.level">${env:LOG_LEVEL:-INFO}</Property> |
||||
<Property name="root.log.logger">${env:LOGGER:-Console}</Property> |
||||
<Property name="host">${env:HOST:-${docker:containerId:-localhost}}</Property> |
||||
<Property name="splunk.url">${env:SPLUNK_URL}</Property> |
||||
<Property name="splunk.token">${env:SPLUNK_TOKEN}</Property> |
||||
<Property name="splunk.index">${env:SPLUNK_INDEX}</Property> |
||||
<Property name="splunk.source">${env:SPLUNK_SOURCE:-besu}</Property> |
||||
<Property name="splunk.sourcetype">${env:SPLUNK_SOURCETYPE:-besu}</Property> |
||||
<Property name="splunk.batch_size_bytes">${env:SPLUNK_BATCH_SIZE_BYTES:-65536}</Property> |
||||
<Property name="splunk.batch_size_count">${env:SPLUNK_BATCH_SIZE_COUNT:-1000}</Property> |
||||
<Property name="splunk.batch_interval">${env:SPLUNK_BATCH_INTERVAL:-500}</Property> |
||||
<Property name="splunk.disableCertificateValidation">${env:SPLUNK_SKIPTLSVERIFY:-false}</Property> |
||||
</Properties> |
||||
|
||||
<Appenders> |
||||
<Console name="Console" target="SYSTEM_OUT"> |
||||
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSSZZZ} | %t | %-5level | %c{1} | %msg%n" /> </Console> |
||||
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSSZZZ} | %t | %-5level | %c{1} | %msg%n" /> |
||||
</Console> |
||||
|
||||
<SplunkHttp name="Splunk" |
||||
url="${sys:splunk.url}" |
||||
token="${sys:splunk.token}" |
||||
host="${sys:host}" |
||||
index="${sys:splunk.index}" |
||||
source="${sys:splunk.source}" |
||||
sourcetype="${sys:splunk.sourcetype}" |
||||
messageFormat="text" |
||||
batch_size_bytes="${sys:splunk.batch_size_bytes}" |
||||
batch_size_count="${sys:splunk.batch_size_count}" |
||||
batch_interval="${sys:splunk.batch_interval}" |
||||
disableCertificateValidation="${sys:splunk.disableCertificateValidation}"> |
||||
<PatternLayout pattern="%msg"/> |
||||
</SplunkHttp> |
||||
|
||||
<Routing name="Router"> |
||||
<Routes pattern="$${sys:root.log.logger}"> |
||||
<Route ref="Console" key="Console" /> |
||||
<Route ref="Splunk" key="Splunk" /> |
||||
</Routes> |
||||
</Routing> |
||||
</Appenders> |
||||
<Loggers> |
||||
<Root level="${sys:root.log.level}"> |
||||
<AppenderRef ref="Console" /> |
||||
<AppenderRef ref="Router" /> |
||||
</Root> |
||||
</Loggers> |
||||
</Configuration> |
||||
|
Loading…
Reference in new issue