diff --git a/nutzcloud/nutzcloud-perca/pom.xml b/nutzcloud/nutzcloud-perca/pom.xml index f1af2cd1..8438b46b 100644 --- a/nutzcloud/nutzcloud-perca/pom.xml +++ b/nutzcloud/nutzcloud-perca/pom.xml @@ -1,4 +1,5 @@ - 4.0.0 org.nutz.cloud @@ -18,19 +19,31 @@ org.nutz.cloud nutzcloud-loach-client + - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-core + 2.13.1 + + + org.apache.logging.log4j + log4j-slf4j-impl + 2.13.1 + + + org.apache.logging.log4j + log4j-1.2-api + 2.13.1 org.nutz nutzboot-starter-jetty - - - org.nutz - nutzboot-starter-nacos-discovery - + + + org.nutz + nutzboot-starter-nacos-discovery + diff --git a/nutzcloud/nutzcloud-perca/src/main/java/org/nutz/cloud/perca/impl/AbstractUrlRewriteRouterFilter.java b/nutzcloud/nutzcloud-perca/src/main/java/org/nutz/cloud/perca/impl/AbstractUrlRewriteRouterFilter.java index 461d38d5..8b522269 100644 --- a/nutzcloud/nutzcloud-perca/src/main/java/org/nutz/cloud/perca/impl/AbstractUrlRewriteRouterFilter.java +++ b/nutzcloud/nutzcloud-perca/src/main/java/org/nutz/cloud/perca/impl/AbstractUrlRewriteRouterFilter.java @@ -119,6 +119,8 @@ public abstract class AbstractUrlRewriteRouterFilter implements RouteFilter { ctx.targetHost = info.host; if (info.port > 0) ctx.targetPort = info.port; + if (log.isDebugEnabled()) + log.debugf("forward reqest %s to %s:%s", ctx.uri, ctx.targetHost, ctx.targetPort); return true; } diff --git a/nutzcloud/nutzcloud-perca/src/main/resources/log4j.properties b/nutzcloud/nutzcloud-perca/src/main/resources/log4j.properties index 9fc798df..c9b93eb3 100644 --- a/nutzcloud/nutzcloud-perca/src/main/resources/log4j.properties +++ b/nutzcloud/nutzcloud-perca/src/main/resources/log4j.properties @@ -1,6 +1,7 @@ log4j.rootLogger=debug,Console log4j.logger.org.eclipse.jetty=info +log4j.loagger.com.alibaba.nacos.client=info log4j.appender.Console=org.apache.log4j.ConsoleAppender log4j.appender.Console.layout=org.apache.log4j.PatternLayout diff --git a/nutzcloud/nutzcloud-perca/src/main/resources/log4j2.xml b/nutzcloud/nutzcloud-perca/src/main/resources/log4j2.xml new file mode 100644 index 00000000..d4be79cc --- /dev/null +++ b/nutzcloud/nutzcloud-perca/src/main/resources/log4j2.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file