Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spring-cloud-learn
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
spring-cloud-learn
Commits
bd88b647
Commit
bd88b647
authored
Sep 30, 2019
by
duanledexianxianxian
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🍱
添加ELK相关配置
parent
6e40c41b
Pipeline
#117
failed
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
1 deletion
+47
-1
spring-cloud-hello-world/order-service/pom.xml
spring-cloud-hello-world/order-service/pom.xml
+6
-0
spring-cloud-hello-world/order-service/src/main/resources/application.yml
...lo-world/order-service/src/main/resources/application.yml
+1
-1
spring-cloud-hello-world/order-service/src/main/resources/logback-spring.xml
...world/order-service/src/main/resources/logback-spring.xml
+37
-0
spring-cloud-hello-world/pom.xml
spring-cloud-hello-world/pom.xml
+3
-0
No files found.
spring-cloud-hello-world/order-service/pom.xml
View file @
bd88b647
...
@@ -44,5 +44,11 @@
...
@@ -44,5 +44,11 @@
<groupId>
org.springframework.cloud
</groupId>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-hystrix
</artifactId>
<artifactId>
spring-cloud-starter-netflix-hystrix
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
net.logstash.logback
</groupId>
<artifactId>
logstash-logback-encoder
</artifactId>
<version>
${logstash.logback.encoder.version}
</version>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
spring-cloud-hello-world/order-service/src/main/resources/application.yml
View file @
bd88b647
spring-cloud-hello-world/order-service/src/main/resources/logback-spring.xml
0 → 100644
View file @
bd88b647
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<springProperty
scope=
"context"
name=
"springAppName"
source=
"spring.application.name"
/>
<include
resource=
"org/springframework/boot/logging/logback/base.xml"
/>
<appender
name=
"LOGSTASH"
class=
"net.logstash.logback.appender.LogstashTcpSocketAppender"
>
<destination>
113.105.144.9:9101
</destination>
<!-- 日志输出编码 -->
<encoder
charset=
"UTF-8"
class=
"net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder"
>
<providers>
<timestamp>
<timeZone>
UTC
</timeZone>
</timestamp>
<pattern>
<pattern>
{
"logLevel": "%level",
"serviceName": "${springAppName:-}",
"pid": "${PID:-}",
"thread": "%thread",
"class": "%logger{40}",
"rest": "%message"
}
</pattern>
</pattern>
</providers>
</encoder>
</appender>
<root
level=
"INFO"
>
<appender-ref
ref=
"LOGSTASH"
/>
<appender-ref
ref=
"CONSOLE"
/>
</root>
</configuration>
\ No newline at end of file
spring-cloud-hello-world/pom.xml
View file @
bd88b647
...
@@ -11,6 +11,9 @@
...
@@ -11,6 +11,9 @@
<artifactId>
spring-cloud-hello-world
</artifactId>
<artifactId>
spring-cloud-hello-world
</artifactId>
<packaging>
pom
</packaging>
<packaging>
pom
</packaging>
<properties>
<logstash.logback.encoder.version>
6.2
</logstash.logback.encoder.version>
</properties>
<modules>
<modules>
<module>
service-discovery
</module>
<module>
service-discovery
</module>
<module>
hello-producer
</module>
<module>
hello-producer
</module>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment