Skip to content

Commit 60ca112

Browse files
committed
Refactor: Remove redundant logger name usage in SimpleFormatter
1 parent 9f8a6bb commit 60ca112

File tree

1 file changed

+2
-2
lines changed
  • spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/java

1 file changed

+2
-2
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/java/SimpleFormatter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*/
3333
public class SimpleFormatter extends Formatter {
3434

35-
private static final String DEFAULT_FORMAT = "[%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS.%1$tL] - %8$s %4$s [%7$s] --- %3$s: %5$s%6$s%n";
35+
private static final String DEFAULT_FORMAT = "[%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS.%1$tL] - %2$s %4$s [%7$s] --- %2$s: %5$s%6$s%n";
3636

3737
private final String format = getOrUseDefault("LOG_FORMAT", DEFAULT_FORMAT);
3838

@@ -45,7 +45,7 @@ public String format(LogRecord record) {
4545
String message = formatMessage(record);
4646
String throwable = getThrowable(record);
4747
String thread = getThreadName();
48-
return String.format(this.format, date, source, record.getLoggerName(), record.getLevel().getLocalizedName(),
48+
return String.format(this.format, date, source, record.getLevel().getLocalizedName(),
4949
message, throwable, thread, this.pid);
5050
}
5151

0 commit comments

Comments
 (0)