Skip to content

Commit

Permalink
Review logging, some code tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
trnguyencflt committed Jul 12, 2023
1 parent b021eac commit 2f203ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public KafkaRestApplication(
config,
path,
listenerName,
createRequestLog(config, requestLogWriter, requestLogFormat, log, listenerName));
createRequestLog(config, requestLogWriter, requestLogFormat, listenerName));

restResourceExtensions =
config.getConfiguredInstances(
Expand All @@ -113,7 +113,6 @@ private static RequestLog createRequestLog(
KafkaRestConfig config,
RequestLog.Writer requestLogWriter,
String requestLogFormat,
Logger log,
String listenerName) {
if (config.getBoolean(KafkaRestConfig.USE_CUSTOM_REQUEST_LOGGING_CONFIG)) {
log.info("For rest-app with listener {}, configuring custom request logging", listenerName);
Expand All @@ -127,12 +126,10 @@ private static RequestLog createRequestLog(
requestLogFormat = CustomRequestLog.EXTENDED_NCSA_FORMAT + " %{ms}T";
}

CustomLog customRequestLog =
new CustomLog(
requestLogWriter,
requestLogFormat,
new String[] {CustomLogRequestAttributes.REST_ERROR_CODE});
return customRequestLog;
return new CustomLog(
requestLogWriter,
requestLogFormat,
new String[] {CustomLogRequestAttributes.REST_ERROR_CODE});
}
// Return null, as Application's ctor would set-up a default request-logger.
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public final void resume(AsyncResponse asyncResponse) {
executorService.shutdownNow();
}
} catch (InterruptedException e) {
log.debug("Exception thrown when attempting to shutdown executorService {}", e);
log.debug("Exception thrown when attempting to shutdown executorService", e);
}
}
}
Expand Down

0 comments on commit 2f203ce

Please sign in to comment.