Polish variables
Extract a few more variables to make the format command easier to follow.
This commit is contained in:
parent
8575ec0e35
commit
29e9ce17ac
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue