-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
cf5cb44
to
9c39198
Compare
9c39198
to
1a5e35a
Compare
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.
Minor changes would be nice, besides that looks good!
@@ -180,6 +181,9 @@ private void onFailure(Exception e) { | |||
// PERMANENT_ERROR | |||
Timber.w("Request failed due to a permanent error: %s", errorMessage); | |||
} | |||
if (logRequestUrl) { | |||
Timber.v(call.request().url().toString()); |
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.
Can we give some more context to this log and maybe make it a Timber.w()
? Alternatively, we could include it in above logs with simplified if
.
@@ -217,4 +221,8 @@ private String getApplicationIdentifier() { | |||
static void enableLog(boolean enabled) { | |||
logEnabled = enabled; | |||
} | |||
|
|||
static void enablePrintRequestUrlOnFaillure(boolean 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.
"faillure" - typo ;)
@@ -16,4 +16,20 @@ | |||
public static void setLogEnabled(boolean enabled) { | |||
HTTPRequest.enableLog(enabled); | |||
} | |||
|
|||
/** | |||
* Enable printing of the request url when a error occurred. Default value is false. |
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.
"a error" - typo ;)
8a55f2b
to
96696ea
Compare
@LukasPaczos, revisited the approach taken, instead of the if/else construct, I went with the |
96696ea
to
3db6bdc
Compare
closes #10825.
cc @danswick