mirror of
https://github.com/google/nomulus
synced 2026-08-28 20:06:20 +00:00
Migrate to Flogger (green)
This is a 'green' Flogger migration CL. Green CLs are intended to be as safe as possible and should be easy to review and submit. No changes should be necessary to the code itself prior to submission, but small changes to BUILD files may be required. Changes within files are completely independent of each other, so this CL can be safely split up for review using tools such as Rosie. For more information, see [] Base CL: 197826149 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=198560170
This commit is contained in:
@@ -28,7 +28,7 @@ import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Streams;
|
||||
import com.google.common.logging.FormattingLogger;
|
||||
import com.google.common.flogger.FluentLogger;
|
||||
import com.googlecode.objectify.Key;
|
||||
import com.googlecode.objectify.Objectify;
|
||||
import com.googlecode.objectify.ObjectifyFactory;
|
||||
@@ -59,7 +59,7 @@ import org.joda.time.Duration;
|
||||
*/
|
||||
public class Ofy {
|
||||
|
||||
private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
|
||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||
|
||||
/** Default clock for transactions that don't provide one. */
|
||||
@NonFinalForTesting
|
||||
@@ -263,7 +263,8 @@ public class Ofy {
|
||||
throw e; // Give up.
|
||||
}
|
||||
sleeper.sleepUninterruptibly(Duration.millis(sleepMillis));
|
||||
logger.infofmt(e, "Retrying %s, attempt %s", e.getClass().getSimpleName(), attempt);
|
||||
logger.atInfo().withCause(e).log(
|
||||
"Retrying %s, attempt %d", e.getClass().getSimpleName(), attempt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user