You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/07/10 08:14:57 UTC

[GitHub] [dubbo] win120a commented on a diff in pull request #10292: [Feature] Adds feature of displaying FAQ link in logger output.

win120a commented on code in PR #10292:
URL: https://github.com/apache/dubbo/pull/10292#discussion_r917358268


##########
dubbo-common/src/main/java/org/apache/dubbo/common/logger/ErrorType.java:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+package org.apache.dubbo.common.logger;
+
+/**
+ * Represents an error type, which can be displayed by the logger like:
+ * ".... This may be caused by [error cause], go to [URL] to find instructions."
+ */
+public enum ErrorType {
+
+    // Temporarily empty. The only one entry is for testing.
+    REGISTRY_CENTER_OFFLINE("registry center offline", "http://dubbo.apache.org/");
+
+    /**
+     * Error cause.
+     */
+    private final String cause;
+
+    /**
+     * Link to instructions.
+     */
+    private final String errorUrl;

Review Comment:
   “需要扩展一个字端在报错的时候可以自定义透出一些信息” 这个是怎么放来着?
   比如这样? ".... This may be caused by [error cause], go to [URL] to find instructions. [自定义信息]"



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org