-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE configuration> | ||
<configuration> | ||
<include resource="org/springframework/boot/logging/logback/base.xml"/> | ||
<include resource="org/springframework/boot/logging/logback/defaults.xml"/> | ||
|
||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<appender name="ELASTIC" class="com.internetitem.logback.elasticsearch.ElasticsearchAppender"> | ||
<url>http://aws-signing-proxy.aws-elasticsearch-proxy.svc.cluster.local:9200/_bulk</url> | ||
<index>datasafe-%date{yyyy-MM-dd}</index> | ||
<type>datasafe</type> | ||
<loggerName>es-logger</loggerName> <!-- optional --> | ||
<errorLoggerName>es-error-logger</errorLoggerName> <!-- optional --> | ||
<connectTimeout>30000</connectTimeout> <!-- optional (in ms, default 30000) --> | ||
<errorsToStderr>false</errorsToStderr> <!-- optional (default false) --> | ||
<includeCallerData>false</includeCallerData> <!-- optional (default false) --> | ||
<logsToStderr>false</logsToStderr> <!-- optional (default false) --> | ||
<maxQueueSize>104857600</maxQueueSize> <!-- optional (default 104857600) --> | ||
<maxRetries>3</maxRetries> <!-- optional (default 3) --> | ||
<readTimeout>30000</readTimeout> <!-- optional (in ms, default 30000) --> | ||
<sleepTime>250</sleepTime> <!-- optional (in ms, default 250) --> | ||
<rawJsonMessage>false</rawJsonMessage> <!-- optional (default false) --> | ||
<includeMdc>false</includeMdc> <!-- optional (default false) --> | ||
<maxMessageSize>100</maxMessageSize> <!-- optional (default -1 --> | ||
<properties> | ||
<property> | ||
<name>host</name> | ||
<value>${HOSTNAME}</value> | ||
<allowEmpty>false</allowEmpty> | ||
</property> | ||
<property> | ||
<name>level</name> | ||
<value>%level</value> | ||
</property> | ||
<property> | ||
<name>thread</name> | ||
<value>%thread</value> | ||
</property> | ||
<property> | ||
<name>stacktrace</name> | ||
<value>%ex</value> | ||
</property> | ||
<property> | ||
<name>logger</name> | ||
<value>%logger</value> | ||
</property> | ||
</properties> | ||
<headers> | ||
<header> | ||
<name>Content-Type</name> | ||
<value>application/json</value> | ||
</header> | ||
</headers> | ||
</appender> | ||
|
||
<root level="INFO"> | ||
<appender-ref ref="STDOUT" /> | ||
<appender-ref ref="ELASTIC" /> | ||
</root> | ||
|
||
<logger name="es-error-logger" level="INFO" additivity="false"> | ||
<appender-ref ref="STDOUT" /> | ||
</logger> | ||
|
||
<logger name="es-logger" level="INFO" additivity="false"> | ||
<appender name="ES_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<encoder> | ||
<pattern>%msg</pattern> <!-- This pattern is important, otherwise it won't be the raw Elasticsearch format anymore --> | ||
</encoder> | ||
</appender> | ||
</logger> | ||
|
||
</configuration> |