mirror of
https://github.com/google/nomulus.git
synced 2025-07-21 18:26:12 +02:00
Improve some log messages for readability/consistency (#1333)
* Improve some log messages for readability/consistency * Address code review comments
This commit is contained in:
parent
3efb2bc509
commit
703c8edd8c
100 changed files with 252 additions and 250 deletions
|
@ -68,7 +68,8 @@ public class AppEngineServiceUtilsImpl implements AppEngineServiceUtils {
|
|||
public String convertToSingleSubdomain(String hostname) {
|
||||
Matcher matcher = APPSPOT_HOSTNAME_PATTERN.matcher(hostname);
|
||||
if (!matcher.matches()) {
|
||||
logger.atWarning().log("Skipping conversion because hostname can't be parsed: %s", hostname);
|
||||
logger.atWarning().log(
|
||||
"Skipping conversion because hostname '%s' can't be parsed.", hostname);
|
||||
return hostname;
|
||||
}
|
||||
return matcher.group(1).replace(".", "-dot-") + ".appspot.com";
|
||||
|
|
|
@ -55,7 +55,7 @@ public class RequestStatusCheckerImpl implements RequestStatusChecker {
|
|||
public String getLogId() {
|
||||
String requestLogId =
|
||||
ApiProxy.getCurrentEnvironment().getAttributes().get(REQUEST_LOG_ID_KEY).toString();
|
||||
logger.atInfo().log("Current requestLogId: %s", requestLogId);
|
||||
logger.atInfo().log("Current requestLogId: %s.", requestLogId);
|
||||
// We want to make sure there actually is a log to query for this request, even if the request
|
||||
// dies right after this call.
|
||||
//
|
||||
|
@ -85,7 +85,7 @@ public class RequestStatusCheckerImpl implements RequestStatusChecker {
|
|||
// So we have to assume it's "running" in that case.
|
||||
if (requestLogs == null) {
|
||||
logger.atInfo().log(
|
||||
"Queried an unrecognized requestLogId %s - assume it's running", requestLogId);
|
||||
"Queried an unrecognized requestLogId %s - assume it's running.", requestLogId);
|
||||
return true;
|
||||
}
|
||||
logger.atInfo().log(
|
||||
|
|
|
@ -173,6 +173,6 @@ public class Retrier implements Serializable {
|
|||
|
||||
private static void reportFailure(Throwable thrown, int failures, int maxAttempts) {
|
||||
logger.atInfo().withCause(thrown).log(
|
||||
"Retrying transient error, attempt %d/%d", failures, maxAttempts);
|
||||
"Retrying transient error, attempt %d/%d.", failures, maxAttempts);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ public class TaskQueueUtils implements Serializable {
|
|||
() -> {
|
||||
for (TaskOptions task : tasks) {
|
||||
logger.atInfo().log(
|
||||
"Enqueuing queue='%s' endpoint='%s'", queue.getQueueName(), task.getUrl());
|
||||
"Enqueuing queue='%s' endpoint='%s'.", queue.getQueueName(), task.getUrl());
|
||||
}
|
||||
return queue.add(tasks);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue