Simplify format method.
This commit is contained in:
parent
5a14d943fb
commit
aef9de2555
|
@ -270,15 +270,8 @@ public class PacketLogging implements CommandExecutor, PacketListener {
|
|||
|
||||
@Override
|
||||
public String format(LogRecord record) {
|
||||
String string = formatMessage(record);
|
||||
if (string.isEmpty()) {
|
||||
return LINE_SEPARATOR;
|
||||
}
|
||||
|
||||
StringBuilder message = new StringBuilder();
|
||||
message.append(MessageFormat.format(FORMAT, DATE.format(record.getMillis()), string));
|
||||
message.append(LINE_SEPARATOR);
|
||||
return message.toString();
|
||||
final String string = formatMessage(record);
|
||||
return string.isEmpty() ? LINE_SEPARATOR : MessageFormat.format(FORMAT, DATE.format(record.getMillis()), string) + LINE_SEPARATOR;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue