[SCB-2734]configure access log and metrics (#41)
diff --git a/authentication-server/src/main/resources/log4j2.xml b/authentication-server/src/main/resources/log4j2.xml deleted file mode 100644 index 3c70391..0000000 --- a/authentication-server/src/main/resources/log4j2.xml +++ /dev/null
@@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one or more - ~ contributor license agreements. See the NOTICE file distributed with - ~ this work for additional information regarding copyright ownership. - ~ The ASF licenses this file to You under the Apache License, Version 2.0 - ~ (the "License"); you may not use this file except in compliance with - ~ the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License. - --> - -<!--this is sample configuration, please modify as your wish--> - -<configuration> - <Properties> - <Property name="log_path">./user/log/</Property> - </Properties> - - <Appenders> - <Console name="Console" target="SYSTEM_OUT"> - <PatternLayout pattern="[%d][%t][%p][%c:%L] %m%n"/> - </Console> - <RollingFile name="DailyRollingFile" fileName="${log_path}/output.log" - filePattern="${log_path}/zcrTest%d{yyyy-MM-dd}.log"> - <PatternLayout pattern="[%d][%t][%p][%c:%L] %m%n"/> - <TimeBasedTriggeringPolicy interval="1"/> - <SizeBasedTriggeringPolicy size="10 MB"/> - </RollingFile> - </Appenders> - <Loggers> - <Root level="info"> - <AppenderRef ref="Console"/> - <AppenderRef ref="DailyRollingFile"/> - </Root> - </Loggers> -</configuration> \ No newline at end of file
diff --git a/authentication-server/src/main/resources/logback.xml b/authentication-server/src/main/resources/logback.xml new file mode 100644 index 0000000..c9afc7a --- /dev/null +++ b/authentication-server/src/main/resources/logback.xml
@@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one or more + ~ contributor license agreements. See the NOTICE file distributed with + ~ this work for additional information regarding copyright ownership. + ~ The ASF licenses this file to You under the Apache License, Version 2.0 + ~ (the "License"); you may not use this file except in compliance with + ~ the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<!--this is sample configuration, please modify as your wish --> + +<configuration scan="true"> + + <property name="log.path" value="./authentication-server/log/"/> + + <appender name="ROOT_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${log.path}/output.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${log.path}/output%d{yyyy-MM-dd}.log</fileNamePattern> + <maxHistory>1</maxHistory> + <totalSizeCap>10MB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{80} - %msg%n</pattern> + </encoder> + </appender> + + <appender name="METRICS" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${log.path}/metrics.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${log.path}/metrics%d{yyyy-MM-dd}.log</fileNamePattern> + <maxHistory>1</maxHistory> + <totalSizeCap>10MB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{80} - %msg%n</pattern> + </encoder> + </appender> + + <appender name="ACCESS" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${log.path}/access.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${log.path}/access%d{yyyy-MM-dd}.log</fileNamePattern> + <maxHistory>1</maxHistory> + <totalSizeCap>10MB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{80} - %msg%n</pattern> + </encoder> + </appender> + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{80} - %msg%n</pattern> + </encoder> + </appender> + + <logger name="org.apache.servicecomb.metrics.core.publish.DefaultLogPublisher" level="INFO" additivity="false"> + <appender-ref ref="METRICS"/> + </logger> + <logger name="accesslog" level="INFO" additivity="false"> + <appender-ref ref="ACCESS" /> + </logger> + + <root level="INFO"> + <appender-ref ref="STDOUT"/> + <appender-ref ref="ROOT_FILE"/> + </root> + +</configuration>
diff --git a/authentication-server/src/main/resources/microservice.yaml b/authentication-server/src/main/resources/microservice.yaml index f6dc979..a46cddc 100644 --- a/authentication-server/src/main/resources/microservice.yaml +++ b/authentication-server/src/main/resources/microservice.yaml
@@ -35,6 +35,17 @@ rest: address: 0.0.0.0:9061 + accesslog: + ## server 端 启用access log + enabled: true + ## server 端 自定义 access log 日志格式 + pattern: "%h %r %s %B %D" + request: + ## client 端开启 request log + enabled: true + ## client 端自定义 request log 日志格式 + pattern: "%h %SCB-transport %r %s %D" + authentication: token: expiresIn: 600
diff --git a/edge-service/src/main/resources/log4j2.xml b/edge-service/src/main/resources/log4j2.xml deleted file mode 100644 index b51f28e..0000000 --- a/edge-service/src/main/resources/log4j2.xml +++ /dev/null
@@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one or more - ~ contributor license agreements. See the NOTICE file distributed with - ~ this work for additional information regarding copyright ownership. - ~ The ASF licenses this file to You under the Apache License, Version 2.0 - ~ (the "License"); you may not use this file except in compliance with - ~ the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License. - --> - -<!--this is sample configuration, please modify as your wish--> - -<configuration> - <Properties> - <Property name="log_path">./gateway/log/</Property> - </Properties> - - <Appenders> - <Console name="Console" target="SYSTEM_OUT"> - <PatternLayout pattern="[%d][%t][%p][%c:%L] %m%n"/> - </Console> - <RollingFile name="DailyRollingFile" fileName="${log_path}/output.log" - filePattern="${log_path}/zcrTest%d{yyyy-MM-dd}.log"> - <PatternLayout pattern="[%d][%t][%p][%c:%L] %m%n"/> - <TimeBasedTriggeringPolicy interval="1"/> - <SizeBasedTriggeringPolicy size="10 MB"/> - </RollingFile> - </Appenders> - <Loggers> - <Root level="info"> - <AppenderRef ref="Console"/> - <AppenderRef ref="DailyRollingFile"/> - </Root> - </Loggers> -</configuration> \ No newline at end of file
diff --git a/edge-service/src/main/resources/logback.xml b/edge-service/src/main/resources/logback.xml new file mode 100644 index 0000000..6847153 --- /dev/null +++ b/edge-service/src/main/resources/logback.xml
@@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one or more + ~ contributor license agreements. See the NOTICE file distributed with + ~ this work for additional information regarding copyright ownership. + ~ The ASF licenses this file to You under the Apache License, Version 2.0 + ~ (the "License"); you may not use this file except in compliance with + ~ the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<!--this is sample configuration, please modify as your wish --> + +<configuration scan="true"> + + <property name="log.path" value="./edge-service/log/"/> + + <appender name="ROOT_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${log.path}/output.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${log.path}/output%d{yyyy-MM-dd}.log</fileNamePattern> + <maxHistory>1</maxHistory> + <totalSizeCap>10MB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{80} - %msg%n</pattern> + </encoder> + </appender> + + <appender name="METRICS" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${log.path}/metrics.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${log.path}/metrics%d{yyyy-MM-dd}.log</fileNamePattern> + <maxHistory>1</maxHistory> + <totalSizeCap>10MB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{80} - %msg%n</pattern> + </encoder> + </appender> + + <appender name="ACCESS" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${log.path}/access.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${log.path}/access%d{yyyy-MM-dd}.log</fileNamePattern> + <maxHistory>1</maxHistory> + <totalSizeCap>10MB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{80} - %msg%n</pattern> + </encoder> + </appender> + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{80} - %msg%n</pattern> + </encoder> + </appender> + + <logger name="org.apache.servicecomb.metrics.core.publish.DefaultLogPublisher" level="INFO" additivity="false"> + <appender-ref ref="METRICS"/> + </logger> + <logger name="accesslog" level="INFO" additivity="false"> + <appender-ref ref="ACCESS" /> + </logger> + + <root level="INFO"> + <appender-ref ref="STDOUT"/> + <appender-ref ref="ROOT_FILE"/> + </root> + +</configuration>
diff --git a/edge-service/src/main/resources/microservice.yaml b/edge-service/src/main/resources/microservice.yaml index ba60751..9ea9ef8 100644 --- a/edge-service/src/main/resources/microservice.yaml +++ b/edge-service/src/main/resources/microservice.yaml
@@ -43,6 +43,17 @@ authentication-server: internalAccess,qps-flowcontrol-consumer,loadbalance authentication-client: internalAccess,qps-flowcontrol-consumer,loadbalance + accesslog: + ## server 端 启用access log + enabled: true + ## server 端 自定义 access log 日志格式 + pattern: "%h %r %s %B %D" + request: + ## client 端开启 request log + enabled: true + ## client 端自定义 request log 日志格式 + pattern: "%h %SCB-transport %r %s %D" + http: dispatcher: edge:
diff --git a/integration-tests/src/main/resources/log4j2.xml b/integration-tests/src/main/resources/log4j2.xml deleted file mode 100644 index 21d465b..0000000 --- a/integration-tests/src/main/resources/log4j2.xml +++ /dev/null
@@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one or more - ~ contributor license agreements. See the NOTICE file distributed with - ~ this work for additional information regarding copyright ownership. - ~ The ASF licenses this file to You under the Apache License, Version 2.0 - ~ (the "License"); you may not use this file except in compliance with - ~ the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License. - --> - -<!--this is sample configuration, please modify as your wish--> - -<configuration> - <Properties> - <Property name="log_path">./user/log/</Property> - </Properties> - - <Appenders> - <Console name="Console" target="SYSTEM_OUT"> - <PatternLayout pattern="[%d][%t][%p][%c:%L] %m%n"/> - </Console> - <RollingFile name="DailyRollingFile" fileName="${log_path}/output.log" - filePattern="${log_path}/zcrTest%d{yyyy-MM-dd}.log"> - <PatternLayout pattern="[%d][%t][%p][%c:%L] %m%n"/> - <TimeBasedTriggeringPolicy interval="1"/> - <SizeBasedTriggeringPolicy size="10 MB"/> - </RollingFile> - </Appenders> - <Loggers> - <Root level="info"> - <AppenderRef ref="Console"/> - <AppenderRef ref="DailyRollingFile"/> - </Root> - </Loggers> -</configuration>
diff --git a/integration-tests/src/main/resources/logback.xml b/integration-tests/src/main/resources/logback.xml new file mode 100644 index 0000000..4000d50 --- /dev/null +++ b/integration-tests/src/main/resources/logback.xml
@@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one or more + ~ contributor license agreements. See the NOTICE file distributed with + ~ this work for additional information regarding copyright ownership. + ~ The ASF licenses this file to You under the Apache License, Version 2.0 + ~ (the "License"); you may not use this file except in compliance with + ~ the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<!--this is sample configuration, please modify as your wish --> + +<configuration scan="true"> + + <property name="log.path" value="./integration-tests/log/"/> + + <appender name="ROOT_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${log.path}/output.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${log.path}/output%d{yyyy-MM-dd}.log</fileNamePattern> + <maxHistory>1</maxHistory> + <totalSizeCap>10MB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{80} - %msg%n</pattern> + </encoder> + </appender> + + <appender name="METRICS" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${log.path}/metrics.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${log.path}/metrics%d{yyyy-MM-dd}.log</fileNamePattern> + <maxHistory>1</maxHistory> + <totalSizeCap>10MB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{80} - %msg%n</pattern> + </encoder> + </appender> + + <appender name="ACCESS" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${log.path}/access.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${log.path}/access%d{yyyy-MM-dd}.log</fileNamePattern> + <maxHistory>1</maxHistory> + <totalSizeCap>10MB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{80} - %msg%n</pattern> + </encoder> + </appender> + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{80} - %msg%n</pattern> + </encoder> + </appender> + + <logger name="org.apache.servicecomb.metrics.core.publish.DefaultLogPublisher" level="INFO" additivity="false"> + <appender-ref ref="METRICS"/> + </logger> + <logger name="accesslog" level="INFO" additivity="false"> + <appender-ref ref="ACCESS" /> + </logger> + + <root level="INFO"> + <appender-ref ref="STDOUT"/> + <appender-ref ref="ROOT_FILE"/> + </root> + +</configuration>
diff --git a/integration-tests/src/main/resources/microservice.yaml b/integration-tests/src/main/resources/microservice.yaml index f19ca7b..8f7ef7f 100644 --- a/integration-tests/src/main/resources/microservice.yaml +++ b/integration-tests/src/main/resources/microservice.yaml
@@ -34,3 +34,14 @@ rest: address: 0.0.0.0:9093 + + accesslog: + ## server 端 启用access log + enabled: true + ## server 端 自定义 access log 日志格式 + pattern: "%h %r %s %B %D" + request: + ## client 端开启 request log + enabled: true + ## client 端自定义 request log 日志格式 + pattern: "%h %SCB-transport %r %s %D"
diff --git a/resource-server/src/main/resources/log4j2.xml b/resource-server/src/main/resources/log4j2.xml deleted file mode 100644 index 3c70391..0000000 --- a/resource-server/src/main/resources/log4j2.xml +++ /dev/null
@@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one or more - ~ contributor license agreements. See the NOTICE file distributed with - ~ this work for additional information regarding copyright ownership. - ~ The ASF licenses this file to You under the Apache License, Version 2.0 - ~ (the "License"); you may not use this file except in compliance with - ~ the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License. - --> - -<!--this is sample configuration, please modify as your wish--> - -<configuration> - <Properties> - <Property name="log_path">./user/log/</Property> - </Properties> - - <Appenders> - <Console name="Console" target="SYSTEM_OUT"> - <PatternLayout pattern="[%d][%t][%p][%c:%L] %m%n"/> - </Console> - <RollingFile name="DailyRollingFile" fileName="${log_path}/output.log" - filePattern="${log_path}/zcrTest%d{yyyy-MM-dd}.log"> - <PatternLayout pattern="[%d][%t][%p][%c:%L] %m%n"/> - <TimeBasedTriggeringPolicy interval="1"/> - <SizeBasedTriggeringPolicy size="10 MB"/> - </RollingFile> - </Appenders> - <Loggers> - <Root level="info"> - <AppenderRef ref="Console"/> - <AppenderRef ref="DailyRollingFile"/> - </Root> - </Loggers> -</configuration> \ No newline at end of file
diff --git a/resource-server/src/main/resources/logback.xml b/resource-server/src/main/resources/logback.xml new file mode 100644 index 0000000..26b9c69 --- /dev/null +++ b/resource-server/src/main/resources/logback.xml
@@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one or more + ~ contributor license agreements. See the NOTICE file distributed with + ~ this work for additional information regarding copyright ownership. + ~ The ASF licenses this file to You under the Apache License, Version 2.0 + ~ (the "License"); you may not use this file except in compliance with + ~ the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<!--this is sample configuration, please modify as your wish --> + +<configuration scan="true"> + + <property name="log.path" value="./resource-server/log/"/> + + <appender name="ROOT_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${log.path}/output.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${log.path}/output%d{yyyy-MM-dd}.log</fileNamePattern> + <maxHistory>1</maxHistory> + <totalSizeCap>10MB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{80} - %msg%n</pattern> + </encoder> + </appender> + + <appender name="METRICS" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${log.path}/metrics.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${log.path}/metrics%d{yyyy-MM-dd}.log</fileNamePattern> + <maxHistory>1</maxHistory> + <totalSizeCap>10MB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{80} - %msg%n</pattern> + </encoder> + </appender> + + <appender name="ACCESS" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${log.path}/access.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${log.path}/access%d{yyyy-MM-dd}.log</fileNamePattern> + <maxHistory>1</maxHistory> + <totalSizeCap>10MB</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{80} - %msg%n</pattern> + </encoder> + </appender> + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{80} - %msg%n</pattern> + </encoder> + </appender> + + <logger name="org.apache.servicecomb.metrics.core.publish.DefaultLogPublisher" level="INFO" additivity="false"> + <appender-ref ref="METRICS"/> + </logger> + <logger name="accesslog" level="INFO" additivity="false"> + <appender-ref ref="ACCESS" /> + </logger> + + <root level="INFO"> + <appender-ref ref="STDOUT"/> + <appender-ref ref="ROOT_FILE"/> + </root> + +</configuration>
diff --git a/resource-server/src/main/resources/microservice.yaml b/resource-server/src/main/resources/microservice.yaml index 05abf87..58ba765 100644 --- a/resource-server/src/main/resources/microservice.yaml +++ b/resource-server/src/main/resources/microservice.yaml
@@ -35,6 +35,17 @@ rest: address: 0.0.0.0:9092 + accesslog: + ## server 端 启用access log + enabled: true + ## server 端 自定义 access log 日志格式 + pattern: "%h %r %s %B %D" + request: + ## client 端开启 request log + enabled: true + ## client 端自定义 request log 日志格式 + pattern: "%h %SCB-transport %r %s %D" + authencation: access: needAuth: true