Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
spring-cloud-netflix
Commits
208117bd
Commit
208117bd
authored
Jan 09, 2018
by
Igor Kryvenko
Committed by
Spencer Gibb
Jan 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hotfix/add-log-ribbon (#2619)
* Add logging to RibbonLoadBalancerRetryPolicy
parent
db66e1c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
RibbonLoadBalancedRetryPolicy.java
...k/cloud/netflix/ribbon/RibbonLoadBalancedRetryPolicy.java
+4
-1
No files found.
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/RibbonLoadBalancedRetryPolicy.java
View file @
208117bd
...
...
@@ -19,6 +19,8 @@ package org.springframework.cloud.netflix.ribbon;
import
com.netflix.client.config.CommonClientConfigKey
;
import
com.netflix.client.config.IClientConfig
;
import
com.netflix.client.config.IClientConfigKey
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryContext
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancedRetryPolicy
;
import
org.springframework.cloud.client.loadbalancer.ServiceInstanceChooser
;
...
...
@@ -35,6 +37,7 @@ import java.util.List;
public
class
RibbonLoadBalancedRetryPolicy
implements
LoadBalancedRetryPolicy
{
public
static
final
IClientConfigKey
<
String
>
RETRYABLE_STATUS_CODES
=
new
CommonClientConfigKey
<
String
>(
"retryableStatusCodes"
)
{};
private
static
final
Log
log
=
LogFactory
.
getLog
(
RibbonLoadBalancedRetryPolicy
.
class
);
private
int
sameServerCount
=
0
;
private
int
nextServerCount
=
0
;
private
String
serviceId
;
...
...
@@ -60,7 +63,7 @@ public class RibbonLoadBalancedRetryPolicy implements LoadBalancedRetryPolicy {
try
{
retryableStatusCodes
.
add
(
Integer
.
valueOf
(
code
.
trim
()));
}
catch
(
NumberFormatException
e
)
{
//TODO log
log
.
warn
(
"We cant add the status code because the code [ "
+
code
+
" ] could not be converted to an integer. "
,
e
);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment