Skip to content

Commit 614aa37

Browse files
committed
Remove arguments and level by default
1 parent ec85f5a commit 614aa37

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

logback-classic/src/main/java/ch/qos/logback/classic/encoder/StructuredLoggingJsonEncoder.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ public class StructuredLoggingJsonEncoder extends JsonEncoder {
4646
protected boolean withTimestampSeconds = false;
4747
protected boolean withTimestampNanos = false;
4848
protected boolean withTime = false;
49+
protected boolean withSeverity = true;
50+
51+
public StructuredLoggingJsonEncoder() {
52+
super();
53+
withArguments = false;
54+
withLevel = false;
55+
}
4956

5057
@Override
5158
protected void appenderTimestamp(StringBuilder sb, ILoggingEvent event) {

logback-classic/src/test/java/ch/qos/logback/classic/encoder/StructuredLoggingJsonEncoderTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ void smoke() throws JsonProcessingException {
112112
assertNull(json.get("timestampSeconds"));
113113
assertNull(json.get("timestampNanos"));
114114
assertNull(json.get("time"));
115+
assertNull(json.get("arguments"));
116+
assertNull(json.get("level"));
115117

116118

117119

0 commit comments

Comments
 (0)