Skip to content

Commit

Permalink
+ dev
Browse files Browse the repository at this point in the history
  • Loading branch information
q3769 committed May 12, 2023
1 parent 9bc0b60 commit abb282d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 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>8.1.3</version>
<version>8.1.4</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
5 changes: 3 additions & 2 deletions src/main/java/elf4j/engine/service/pattern/JsonPattern.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@
@Value
@Builder
public class JsonPattern implements LogPattern {
private static final String UTF_8 = StandardCharsets.UTF_8.toString();
private static final int JSON_BYTES_INIT_SIZE = 1024;
private static final String CALLER_DETAIL = "caller-detail";
private static final String CALLER_THREAD = "caller-thread";
private static final String PRETTY = "pretty";
private static final Set<String> DISPLAY_OPTIONS =
Arrays.stream(new String[] { CALLER_THREAD, CALLER_DETAIL, PRETTY }).collect(Collectors.toSet());
private static final int JSON_BYTES_INIT_SIZE = 1024;
boolean includeCallerThread;
boolean includeCallerDetail;
boolean prettyPrint;
Expand Down Expand Up @@ -107,7 +108,7 @@ public void render(LogEvent logEvent, StringBuilder target) {
try (OutputStream outputStream = this.prettyPrint ? new PrettifyOutputStream(byteArrayOutputStream) :
byteArrayOutputStream) {
dslJson.serialize(JsonLogEntry.from(logEvent, this), outputStream);
target.append(byteArrayOutputStream.toString(StandardCharsets.UTF_8.toString()));
target.append(byteArrayOutputStream.toString(UTF_8));
} catch (IOException e) {
throw new UncheckedIOException(e);
}
Expand Down

0 comments on commit abb282d

Please sign in to comment.