Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apollo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
apollo
Commits
b3fb3fac
Unverified
Commit
b3fb3fac
authored
Oct 04, 2018
by
Jason Song
Committed by
GitHub
Oct 04, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1530 from nobodyiam/rolling-logs
use spring boot's new feature to rotate log files
parents
44aae099
a7f4a024
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
6 additions
and
43 deletions
+6
-43
apollo-adminservice/src/main/resources/application.yml
apollo-adminservice/src/main/resources/application.yml
+1
-2
apollo-adminservice/src/main/resources/logback.xml
apollo-adminservice/src/main/resources/logback.xml
+0
-12
apollo-common/src/main/resources/application.properties
apollo-common/src/main/resources/application.properties
+2
-0
apollo-configservice/src/main/resources/application.yml
apollo-configservice/src/main/resources/application.yml
+2
-3
apollo-configservice/src/main/resources/logback.xml
apollo-configservice/src/main/resources/logback.xml
+0
-12
apollo-portal/src/main/resources/application.yml
apollo-portal/src/main/resources/application.yml
+1
-2
apollo-portal/src/main/resources/logback.xml
apollo-portal/src/main/resources/logback.xml
+0
-12
No files found.
apollo-adminservice/src/main/resources/application.yml
View file @
b3fb3fac
...
@@ -11,5 +11,4 @@ server:
...
@@ -11,5 +11,4 @@ server:
port
:
8090
port
:
8090
logging
:
logging
:
path
:
/opt/logs/100003172
file
:
/opt/logs/100003172/apollo-adminservice.log
file
:
${logging.path}/apollo-adminservice.log
apollo-adminservice/src/main/resources/logback.xml
View file @
b3fb3fac
...
@@ -3,22 +3,10 @@
...
@@ -3,22 +3,10 @@
<include
resource=
"org/springframework/boot/logging/logback/defaults.xml"
/>
<include
resource=
"org/springframework/boot/logging/logback/defaults.xml"
/>
<property
name=
"LOG_FILE"
<property
name=
"LOG_FILE"
value=
"${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}apollo-adminservice.log}"
/>
value=
"${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}apollo-adminservice.log}"
/>
<property
name=
"LOG_PATH"
value=
"${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}"
/>
<include
resource=
"org/springframework/boot/logging/logback/file-appender.xml"
/>
<include
resource=
"org/springframework/boot/logging/logback/file-appender.xml"
/>
<include
resource=
"org/springframework/boot/logging/logback/console-appender.xml"
/>
<include
resource=
"org/springframework/boot/logging/logback/console-appender.xml"
/>
<root
level=
"INFO"
>
<root
level=
"INFO"
>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"CONSOLE"
/>
<appender-ref
ref=
"CONSOLE"
/>
</root>
</root>
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
>
<fileNamePattern>
${LOG_PATH}/apollo-adminservice.%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<maxFileSize>
50MB
</maxFileSize>
<maxHistory>
30
</maxHistory>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</encoder>
</appender>
</configuration>
</configuration>
apollo-common/src/main/resources/application.properties
View file @
b3fb3fac
...
@@ -15,3 +15,5 @@ server.max-http-header-size=10240
...
@@ -15,3 +15,5 @@ server.max-http-header-size=10240
# Spring Boot 2.0
# Spring Boot 2.0
management.endpoints.web.base-path
=
/
management.endpoints.web.base-path
=
/
logging.file.max-size
=
50MB
logging.file.max-history
=
30
apollo-configservice/src/main/resources/application.yml
View file @
b3fb3fac
...
@@ -11,5 +11,4 @@ server:
...
@@ -11,5 +11,4 @@ server:
port
:
8080
port
:
8080
logging
:
logging
:
path
:
/opt/logs/100003171
file
:
/opt/logs/100003171/apollo-configservice.log
file
:
${logging.path}/apollo-configservice.log
apollo-configservice/src/main/resources/logback.xml
View file @
b3fb3fac
...
@@ -3,22 +3,10 @@
...
@@ -3,22 +3,10 @@
<include
resource=
"org/springframework/boot/logging/logback/defaults.xml"
/>
<include
resource=
"org/springframework/boot/logging/logback/defaults.xml"
/>
<property
name=
"LOG_FILE"
<property
name=
"LOG_FILE"
value=
"${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}apollo-configservice.log}"
/>
value=
"${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}apollo-configservice.log}"
/>
<property
name=
"LOG_PATH"
value=
"${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}"
/>
<include
resource=
"org/springframework/boot/logging/logback/file-appender.xml"
/>
<include
resource=
"org/springframework/boot/logging/logback/file-appender.xml"
/>
<include
resource=
"org/springframework/boot/logging/logback/console-appender.xml"
/>
<include
resource=
"org/springframework/boot/logging/logback/console-appender.xml"
/>
<root
level=
"INFO"
>
<root
level=
"INFO"
>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"CONSOLE"
/>
<appender-ref
ref=
"CONSOLE"
/>
</root>
</root>
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
>
<fileNamePattern>
${LOG_PATH}/apollo-configservice.%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<maxFileSize>
50MB
</maxFileSize>
<maxHistory>
30
</maxHistory>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</encoder>
</appender>
</configuration>
</configuration>
apollo-portal/src/main/resources/application.yml
View file @
b3fb3fac
...
@@ -12,8 +12,7 @@ server:
...
@@ -12,8 +12,7 @@ server:
port
:
8080
port
:
8080
logging
:
logging
:
path
:
/opt/logs/100003173
file
:
/opt/logs/100003173/apollo-portal.log
file
:
${logging.path}/apollo-portal.log
management
:
management
:
health
:
health
:
...
...
apollo-portal/src/main/resources/logback.xml
View file @
b3fb3fac
...
@@ -3,22 +3,10 @@
...
@@ -3,22 +3,10 @@
<include
resource=
"org/springframework/boot/logging/logback/defaults.xml"
/>
<include
resource=
"org/springframework/boot/logging/logback/defaults.xml"
/>
<property
name=
"LOG_FILE"
<property
name=
"LOG_FILE"
value=
"${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}apollo-portal.log}"
/>
value=
"${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}apollo-portal.log}"
/>
<property
name=
"LOG_PATH"
value=
"${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}"
/>
<include
resource=
"org/springframework/boot/logging/logback/file-appender.xml"
/>
<include
resource=
"org/springframework/boot/logging/logback/file-appender.xml"
/>
<include
resource=
"org/springframework/boot/logging/logback/console-appender.xml"
/>
<include
resource=
"org/springframework/boot/logging/logback/console-appender.xml"
/>
<root
level=
"INFO"
>
<root
level=
"INFO"
>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"CONSOLE"
/>
<appender-ref
ref=
"CONSOLE"
/>
</root>
</root>
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
>
<fileNamePattern>
${LOG_PATH}/apollo-portal.%d{yyyy-MM-dd}.%i.log}
</fileNamePattern>
<maxFileSize>
50MB
</maxFileSize>
<maxHistory>
30
</maxHistory>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</encoder>
</appender>
</configuration>
</configuration>
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