Polish variables

Extract a few more variables to make the format command easier to
follow.
This commit is contained in:
Phillip Webb 2025-01-06 10:15:39 -08:00
parent 8575ec0e35
commit 29e9ce17ac
1 changed files with 4 additions and 2 deletions

View File

@ -42,11 +42,13 @@ public class SimpleFormatter extends Formatter {
public String format(LogRecord record) {
Date date = new Date(record.getMillis());
String source = record.getLoggerName();
String loggerName = record.getLoggerName();
String level = record.getLevel().getLocalizedName();
String message = formatMessage(record);
String throwable = getThrowable(record);
String thread = getThreadName();
return String.format(this.format, date, source, record.getLoggerName(), record.getLevel().getLocalizedName(),
message, throwable, thread, this.pid);
String pid = this.pid;
return String.format(this.format, date, source, loggerName, level, message, throwable, thread, pid);
}
private String getThrowable(LogRecord record) {