Sync docs from master to gh-pages
This commit is contained in:
@@ -283,17 +283,16 @@ To do so, you have to do the following (for readability, we pass the dependencie
|
||||
<p><strong>Logback Setup</strong></p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Consider the following example of a Logback configuration file (named <a href="https://github.com/spring-cloud-samples/sleuth-documentation-apps/blob/master/service1/src/main/resources/logback-spring.xml">logback-spring.xml</a>).</p>
|
||||
<p>Consider the following example of a Logback configuration file (named <a href="https://raw.githubusercontent.com/spring-cloud/spring-cloud-sleuth/master/docs/src/main/asciidoc/logback-spring.xml">logback-spring.xml</a>).</p>
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlightjs highlight"><code class="language-xml hljs" data-lang="xml"><?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
|
||||
|
||||
<springProperty scope="context" name="springAppName" source="spring.application.name"/>
|
||||
<!-- Example for logging into the build folder of your project -->
|
||||
<property name="LOG_FILE" value="${BUILD_FOLDER:-build}/${springAppName}"/>
|
||||
<property name="LOG_FILE" value="${BUILD_FOLDER:-build}/${springAppName}"/>
|
||||
|
||||
<!-- You can override this to have a custom pattern -->
|
||||
<property name="CONSOLE_LOG_PATTERN"
|
||||
@@ -311,7 +310,7 @@ To do so, you have to do the following (for readability, we pass the dependencie
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- Appender to log to file -->
|
||||
<!-- Appender to log to file -->
|
||||
<appender name="flatfile" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${LOG_FILE}</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
@@ -323,7 +322,6 @@ To do so, you have to do the following (for readability, we pass the dependencie
|
||||
<charset>utf8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- Appender to log to file in a JSON format -->
|
||||
<appender name="logstash" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${LOG_FILE}.json</file>
|
||||
@@ -339,13 +337,11 @@ To do so, you have to do the following (for readability, we pass the dependencie
|
||||
<pattern>
|
||||
<pattern>
|
||||
{
|
||||
"timestamp": "@timestamp",
|
||||
"severity": "%level",
|
||||
"service": "${springAppName:-}",
|
||||
"trace": "%X{X-B3-TraceId:-}",
|
||||
"span": "%X{X-B3-SpanId:-}",
|
||||
"parent": "%X{X-B3-ParentSpanId:-}",
|
||||
"exportable": "%X{X-Span-Export:-}",
|
||||
"baggage": "%X{key:-}",
|
||||
"trace": "%X{traceId:-}",
|
||||
"span": "%X{spanId:-}",
|
||||
"pid": "${PID:-}",
|
||||
"thread": "%thread",
|
||||
"class": "%logger{40}",
|
||||
@@ -356,7 +352,6 @@ To do so, you have to do the following (for readability, we pass the dependencie
|
||||
</providers>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="console"/>
|
||||
<!-- uncomment this to have also JSON logs -->
|
||||
|
||||
Reference in New Issue
Block a user