Skip to content

Commit

Permalink
+ json pattern element order adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
q3769 committed Oct 8, 2023
1 parent 77461f3 commit 33898a7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<groupId>io.github.elf4j</groupId>
<artifactId>elf4j-engine</artifactId>
<version>13.0.4</version>
<version>13.0.5</version>
<packaging>jar</packaging>
<name>elf4j-engine</name>
<description>A stand-alone Java log engine implementing the ELF4J (Easy Logging Facade for Java) API</description>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/elf4j/engine/service/pattern/JsonElement.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ public void render(LogEvent logEvent, @NonNull StringBuilder target) {
@CompiledJson
static class JsonLogEntry {
OffsetDateTime timestamp;
CharSequence message;
LogEvent.ThreadValue callerThread;
String level;
CharSequence message;
String callerClass;
LogEvent.ThreadValue callerThread;
LogEvent.StackFrameValue callerDetail;
CharSequence exception;

Expand Down
3 changes: 2 additions & 1 deletion src/test/resources/elf4j-test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ level@org.apache=error
### Overriding default writer pattern (optional)
#pattern={timestamp:yyyy-MM-dd HH:mm:ss} {level} {thread} {class:full} - {message}
#pattern={json:caller-thread,caller-detail,pretty}
pattern={json}
pattern={json:caller-thread}
#pattern={json}
### Max concurrency to process log events from all caller threads
#concurrency=20

0 comments on commit 33898a7

Please sign in to comment.