Skip to content

Refactor: Remove redundant logger name usage in SimpleFormatter #43631

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*/
public class SimpleFormatter extends Formatter {

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";
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";

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

Expand All @@ -45,7 +45,7 @@ public String format(LogRecord record) {
String message = formatMessage(record);
String throwable = getThrowable(record);
String thread = getThreadName();
return String.format(this.format, date, source, record.getLoggerName(), record.getLevel().getLocalizedName(),
return String.format(this.format, date, source, record.getLevel().getLocalizedName(),
message, throwable, thread, this.pid);
}

Expand Down
Loading