mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-26 06:39:20 +00:00
Log Job retryable exceptions.
This commit is contained in:
@@ -74,7 +74,7 @@ public abstract class Job extends Worker implements Serializable {
|
|||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (onShouldRetry(e)) {
|
if (onShouldRetry(e)) {
|
||||||
log("Retrying after a retryable exception." + logSuffix());
|
log("Retrying after a retryable exception." + logSuffix(), e);
|
||||||
return retry();
|
return retry();
|
||||||
}
|
}
|
||||||
warn("Failing due to an exception." + logSuffix(), e);
|
warn("Failing due to an exception." + logSuffix(), e);
|
||||||
@@ -91,7 +91,7 @@ public abstract class Job extends Worker implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final void onSubmit(UUID id) {
|
final void onSubmit(UUID id) {
|
||||||
log(id, "onSubmit()");
|
Log.i(TAG, buildLog(id, "onSubmit()"));
|
||||||
onAdded();
|
onAdded();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,11 +184,11 @@ public abstract class Job extends Worker implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void log(@NonNull String message) {
|
private void log(@NonNull String message) {
|
||||||
log(getId(), message);
|
log(message, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void log(@NonNull UUID id, @NonNull String message) {
|
private void log(@NonNull String message, @Nullable Throwable t) {
|
||||||
Log.i(TAG, buildLog(id, message));
|
Log.i(TAG, buildLog(getId(), message), t);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void warn(@NonNull String message) {
|
private void warn(@NonNull String message) {
|
||||||
|
|||||||
Reference in New Issue
Block a user