Integrate log4j2 kafka appender
This commit is contained in:
@@ -25,12 +25,12 @@
|
|||||||
<log4j2.version>2.17.2</log4j2.version>
|
<log4j2.version>2.17.2</log4j2.version>
|
||||||
<slf4j.version>1.7.36</slf4j.version>
|
<slf4j.version>1.7.36</slf4j.version>
|
||||||
<commons-lang3.version>3.12.0</commons-lang3.version>
|
<commons-lang3.version>3.12.0</commons-lang3.version>
|
||||||
<lombok.version>1.18.22</lombok.version>
|
<lombok.version>1.18.24</lombok.version>
|
||||||
<apache.dubbo.version>2.7.7</apache.dubbo.version>
|
<apache.dubbo.version>2.7.7</apache.dubbo.version>
|
||||||
<grpc.version>1.16.1</grpc.version>
|
<grpc.version>1.16.1</grpc.version>
|
||||||
<mockito.version>3.4.6</mockito.version>
|
<mockito.version>3.4.6</mockito.version>
|
||||||
<curator.version>4.0.1</curator.version>
|
<curator.version>4.0.1</curator.version>
|
||||||
<zookeeper.version>3.5.9</zookeeper.version>
|
<zookeeper.version>3.5.10</zookeeper.version>
|
||||||
<commons-codec.version>1.15</commons-codec.version>
|
<commons-codec.version>1.15</commons-codec.version>
|
||||||
<commons-pool2.version>2.11.1</commons-pool2.version>
|
<commons-pool2.version>2.11.1</commons-pool2.version>
|
||||||
<gson.version>2.8.9</gson.version>
|
<gson.version>2.8.9</gson.version>
|
||||||
|
|||||||
@@ -8,9 +8,8 @@
|
|||||||
</properties>
|
</properties>
|
||||||
<Appenders>
|
<Appenders>
|
||||||
<Console name="Console" target="SYSTEM_OUT">
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
<!--<PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level [%-29t] %30c{1}.%41M:%4L %m %ex%n"/>-->
|
<!--<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %t %level %logger{2} - %msg{nolookups}%n"/>-->
|
||||||
<!--<PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %30c{1}.%41M:%4L %X{traceId} %m{nolookups} %ex%n"/>-->
|
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %t %level %logger{2} - %X{traceId} %msg{nolookups}%n"/>
|
||||||
<PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %30c{1}.%41M:%4L %m{nolookups} %ex%n"/>
|
|
||||||
</Console>
|
</Console>
|
||||||
<LogSend name="LogSend">
|
<LogSend name="LogSend">
|
||||||
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %level %logger{36} - %msg{nolookups}%n"/>
|
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %level %logger{36} - %msg{nolookups}%n"/>
|
||||||
@@ -56,7 +55,10 @@
|
|||||||
<Logger name="org.apache.kafka" level="info" includeLocation="false"/>
|
<Logger name="org.apache.kafka" level="info" includeLocation="false"/>
|
||||||
<!-- suppress the warn 'No URLs will be polled as dynamic configuration sources.' -->
|
<!-- suppress the warn 'No URLs will be polled as dynamic configuration sources.' -->
|
||||||
<logger name="com.netflix.config.sources.URLConfigurationSource" level="ERROR" includeLocation="false"/>
|
<logger name="com.netflix.config.sources.URLConfigurationSource" level="ERROR" includeLocation="false"/>
|
||||||
<Logger name="we" level="info" includeLocation="false"/>
|
<Logger name="we" level="info" includeLocation="false" additivity="false">
|
||||||
|
<AppenderRef ref="Console"/>
|
||||||
|
<AppenderRef ref="LogSend" level="warn"/>
|
||||||
|
</Logger>
|
||||||
<Logger name="monitor" level="info" includeLocation="false" additivity="false">
|
<Logger name="monitor" level="info" includeLocation="false" additivity="false">
|
||||||
<AppenderRef ref="Console"/>
|
<AppenderRef ref="Console"/>
|
||||||
<!--<AppenderRef ref="KafkaAppender4monitor"/>-->
|
<!--<AppenderRef ref="KafkaAppender4monitor"/>-->
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public class AggregateFilter implements WebFilter {
|
|||||||
} else {
|
} else {
|
||||||
byte act = WebUtils.getApiConfigType(exchange);
|
byte act = WebUtils.getApiConfigType(exchange);
|
||||||
if (act == ApiConfig.Type.UNDEFINED) {
|
if (act == ApiConfig.Type.UNDEFINED) {
|
||||||
String p = exchange.getRequest().getPath().value();
|
String p = exchange.getRequest().getURI().getPath();
|
||||||
if (StringUtils.startsWith(p, SystemConfig.DEFAULT_GATEWAY_TEST_PREFIX0)) {
|
if (StringUtils.startsWith(p, SystemConfig.DEFAULT_GATEWAY_TEST_PREFIX0)) {
|
||||||
if (systemConfig.isAggregateTestAuth()) {
|
if (systemConfig.isAggregateTestAuth()) {
|
||||||
return chain.filter(exchange);
|
return chain.filter(exchange);
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ public class FlowControlFilter extends FizzWebFilter {
|
|||||||
public Mono<Void> doFilter(ServerWebExchange exchange, WebFilterChain chain) {
|
public Mono<Void> doFilter(ServerWebExchange exchange, WebFilterChain chain) {
|
||||||
|
|
||||||
ServerHttpRequest request = exchange.getRequest();
|
ServerHttpRequest request = exchange.getRequest();
|
||||||
String path = request.getPath().value();
|
String path = request.getURI().getPath();
|
||||||
boolean adminReq = false, proxyTestReq = false, fizzApiReq = false, favReq = false;
|
boolean adminReq = false, proxyTestReq = false, fizzApiReq = false, favReq = false;
|
||||||
if (path.equals(favPath)) {
|
if (path.equals(favPath)) {
|
||||||
exchange.getAttributes().put(WebUtils.FAV_REQUEST, Consts.S.EMPTY);
|
exchange.getAttributes().put(WebUtils.FAV_REQUEST, Consts.S.EMPTY);
|
||||||
|
|||||||
@@ -331,7 +331,8 @@ public abstract class WebUtils {
|
|||||||
public static String getClientReqPath(ServerWebExchange exchange) {
|
public static String getClientReqPath(ServerWebExchange exchange) {
|
||||||
String p = exchange.getAttribute(clientRequestPath);
|
String p = exchange.getAttribute(clientRequestPath);
|
||||||
if (p == null) {
|
if (p == null) {
|
||||||
p = exchange.getRequest().getPath().value();
|
// p = exchange.getRequest().getPath().value();
|
||||||
|
p = exchange.getRequest().getURI().getPath();
|
||||||
int secFS = p.indexOf(Consts.S.FORWARD_SLASH, 1);
|
int secFS = p.indexOf(Consts.S.FORWARD_SLASH, 1);
|
||||||
if (StringUtils.isBlank(gatewayPrefix) || Consts.S.FORWARD_SLASH_STR.equals(gatewayPrefix)) {
|
if (StringUtils.isBlank(gatewayPrefix) || Consts.S.FORWARD_SLASH_STR.equals(gatewayPrefix)) {
|
||||||
p = p.substring(secFS);
|
p = p.substring(secFS);
|
||||||
|
|||||||
6
pom.xml
6
pom.xml
@@ -18,7 +18,7 @@
|
|||||||
<grpc.version>1.16.1</grpc.version>
|
<grpc.version>1.16.1</grpc.version>
|
||||||
<mockito.version>3.4.6</mockito.version>
|
<mockito.version>3.4.6</mockito.version>
|
||||||
<curator.version>4.0.1</curator.version>
|
<curator.version>4.0.1</curator.version>
|
||||||
<zookeeper.version>3.5.9</zookeeper.version>
|
<zookeeper.version>3.5.10</zookeeper.version>
|
||||||
<r2dbc-mysql.version>0.8.2</r2dbc-mysql.version>
|
<r2dbc-mysql.version>0.8.2</r2dbc-mysql.version>
|
||||||
<reflections.version>0.9.11</reflections.version>
|
<reflections.version>0.9.11</reflections.version>
|
||||||
<commons-pool2.version>2.11.1</commons-pool2.version>
|
<commons-pool2.version>2.11.1</commons-pool2.version>
|
||||||
@@ -294,7 +294,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.noear</groupId>
|
<groupId>org.noear</groupId>
|
||||||
<artifactId>snack3</artifactId>
|
<artifactId>snack3</artifactId>
|
||||||
<version>3.2.24</version>
|
<version>3.2.29</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -343,7 +343,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<version>1.18.22</version>
|
<version>1.18.24</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- grpc -->
|
<!-- grpc -->
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user