Skip to content

Commit

Permalink
set log level correctly for multi-line messages
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed Sep 25, 2024
1 parent 3c19169 commit 8532793
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/app/attestation/server/JournaldFormatter.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ public synchronized String format(LogRecord record) {
source = record.getLoggerName();
}
final int level = toSyslogLevel(record.getLevel());
final String message = formatMessage(record);
final String newline = "\n<" + toSyslogLevel(record.getLevel()) + ">";
final String message = formatMessage(record).replace("\n", newline);
String throwable = "";
if (record.getThrown() != null) {
final String newline = "\n<" + toSyslogLevel(record.getLevel()) + ">";
final StringWriter sw = new StringWriter();
final PrintWriter pw = new PrintWriter(sw) {
@Override
Expand Down

0 comments on commit 8532793

Please sign in to comment.