You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2022/09/03 08:51:43 UTC

[dubbo] branch 3.1 updated: faq (#10540)

This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch 3.1
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.1 by this push:
     new eb919e9dd3 faq (#10540)
eb919e9dd3 is described below

commit eb919e9dd38c1de9cdbcb4f3db8815664105ef14
Author: xin gu <41...@qq.com>
AuthorDate: Sat Sep 3 16:51:36 2022 +0800

    faq (#10540)
    
    faq-tagrouter
---
 .../apache/dubbo/rpc/cluster/router/tag/TagStateRouter.java  | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/tag/TagStateRouter.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/tag/TagStateRouter.java
index 5b57b21514..9b76a1d28b 100644
--- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/tag/TagStateRouter.java
+++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/tag/TagStateRouter.java
@@ -21,7 +21,7 @@ import org.apache.dubbo.common.config.configcenter.ConfigChangeType;
 import org.apache.dubbo.common.config.configcenter.ConfigChangedEvent;
 import org.apache.dubbo.common.config.configcenter.ConfigurationListener;
 import org.apache.dubbo.common.config.configcenter.DynamicConfiguration;
-import org.apache.dubbo.common.logger.Logger;
+import org.apache.dubbo.common.logger.ErrorTypeAwareLogger;
 import org.apache.dubbo.common.logger.LoggerFactory;
 import org.apache.dubbo.common.utils.CollectionUtils;
 import org.apache.dubbo.common.utils.Holder;
@@ -48,7 +48,7 @@ import static org.apache.dubbo.rpc.Constants.FORCE_USE_TAG;
  */
 public class TagStateRouter<T> extends AbstractStateRouter<T> implements ConfigurationListener {
     public static final String NAME = "TAG_ROUTER";
-    private static final Logger logger = LoggerFactory.getLogger(TagStateRouter.class);
+    private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(TagStateRouter.class);
     private static final String RULE_SUFFIX = ".tag-router";
 
     private TagRouterRule tagRouterRule;
@@ -72,8 +72,8 @@ public class TagStateRouter<T> extends AbstractStateRouter<T> implements Configu
                 this.tagRouterRule = TagRuleParser.parse(event.getContent());
             }
         } catch (Exception e) {
-            logger.error("Failed to parse the raw tag router rule and it will not take effect, please check if the " +
-                "rule matches with the template, the raw rule is:\n ", e);
+            logger.error("2-11","Failed to parse the raw tag router rule","","Failed to parse the raw tag router rule and it will not take effect, please check if the " +
+                "rule matches with the template, the raw rule is:\n ",e);
         }
     }
 
@@ -235,7 +235,7 @@ public class TagStateRouter<T> extends AbstractStateRouter<T> implements Configu
                     return true;
                 }
             } catch (Exception e) {
-                logger.error("The format of ip address is invalid in tag route. Address :" + address, e);
+                logger.error("2-11","tag route address is invalid","","The format of ip address is invalid in tag route. Address :" + address,e);
             }
         }
         return false;
@@ -256,7 +256,7 @@ public class TagStateRouter<T> extends AbstractStateRouter<T> implements Configu
         String providerApplication = url.getRemoteApplication();
 
         if (StringUtils.isEmpty(providerApplication)) {
-            logger.error("TagRouter must getConfig from or subscribe to a specific application, but the application " +
+            logger.error("2-12","tag router get providerApplication is empty","","TagRouter must getConfig from or subscribe to a specific application, but the application " +
                 "in this TagRouter is not specified.");
             return;
         }