Skip to content

Commit

Permalink
Reduce code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
RetGal committed Nov 13, 2023
1 parent 7430bf4 commit b84061e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/mpo/dayon/common/log/LogAppender.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import java.util.Date;

public abstract class LogAppender {
private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("HH:mm:ss.SSS");
private final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss.SSS");

protected String format(LogLevel level, String message) {
message = (message == null) ? "" : message;
return String.format("[%20.20s] [%5.5s] (%s) %s", Thread.currentThread().getName(), level,
DATE_FORMAT.format(Date.from(Instant.now())), message);
dateFormat.format(Date.from(Instant.now())), message);
}

public void append(LogLevel level, String message) {
Expand Down

0 comments on commit b84061e

Please sign in to comment.