-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#1321] add logger request server serviceName/ip/port #1322
Conversation
@@ -30,6 +30,8 @@ public class GovernanceProperties { | |||
|
|||
public static final int WEB_FILTER_SERVICE_AUTH_ORDER = -60000; | |||
|
|||
public static final int WEB_FILTER_REQUEST_SERVICE_LOGGER_ORDER = -35000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WEB_FILTER_REQUEST_LOGGER_ORDER
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -56,6 +58,9 @@ public class GovernanceProperties { | |||
public static final String WEBCLIENT_FAULT_INJECTION_ENABLED = | |||
PREFIX + "." + "webclient.faultInjection.enabled"; | |||
|
|||
public static final String WEBCLIENT_REQUEST_SERVICE_LOGGER_ENABLED = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WEBCLIENT_REQUEST_LOGGER_ENABLED
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -56,6 +58,9 @@ public class GovernanceProperties { | |||
public static final String WEBCLIENT_FAULT_INJECTION_ENABLED = | |||
PREFIX + "." + "webclient.faultInjection.enabled"; | |||
|
|||
public static final String WEBCLIENT_REQUEST_SERVICE_LOGGER_ENABLED = | |||
PREFIX + "." + "webclient.requestServiceLogger.enabled"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requestServiceLogger -> requestLogger
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
||
public static void logServiceInfo(InvocationContext context, Throwable e) { | ||
if (context != null && context.getLocalContext(GovernanceConst.CONTEXT_CURRENT_INSTANCE) != null) { | ||
if (context.getLocalContext(GovernanceConst.CONTEXT_CURRENT_INSTANCE) instanceof ServiceInstance) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CONTEXT_CURRENT_INSTANCE 还可能是其他类型吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有,已去掉判断
} | ||
|
||
private ClientResponse logServiceInfo(ClientResponse response, ClientRequest request) { | ||
if (response.statusCode() != HttpStatusCode.valueOf(200)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
response.statusCode().value() != 200 or family.isSucceful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
OK |
No description provided.