Skip to content

Commit 0dd1c58

Browse files
Changes from Code Review
* rename FullVcapEnvFieldSupplier (typo) * change test case to demonstrate numerical custom field values Signed-off-by: Karsten Schnitter <[email protected]>
1 parent b49298b commit 0dd1c58

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

cf-java-logging-support-core/src/main/java/com/sap/hcp/cf/logging/common/serialization/FullVcapEnvFieldFupplier.java

Lines changed: 0 additions & 8 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.sap.hcp.cf.logging.common.serialization;
2+
3+
public class FullVcapEnvFieldSupplier extends VcapEnvFieldSupplier {
4+
5+
public FullVcapEnvFieldSupplier() {
6+
super(true);
7+
}
8+
}

cf-java-logging-support-logback/src/test/java/com/sap/hcp/cf/logback/encoder/EventContextFieldSupplierTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ public void customFields() throws Exception {
5252
Object[] arguments = new Object[] { //
5353
new Object(), //
5454
CustomField.customField("key", "value"), //
55-
CustomField.customField("this", "that") };
55+
CustomField.customField("number", Double.valueOf(123.456d)) };
5656
when(event.getArgumentArray()).thenReturn(arguments);
5757

5858
Map<String, Object> fields = fieldSupplier.map(event);
5959
assertThat(fields, hasEntry("key", "value"));
60-
assertThat(fields, hasEntry("this", "that"));
60+
assertThat(fields, hasEntry("number", Double.valueOf(123.456d)));
6161
}
6262

6363
@Test

cf-java-logging-support-logback/src/test/resources/logback-test.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class="ch.qos.logback.core.ConsoleAppender">
66
<encoder class="com.sap.hcp.cf.logback.encoder.JsonEncoder">
77
<sendDefaultValues>true</sendDefaultValues>
8-
<contextFieldSupplier>com.sap.hcp.cf.logging.common.serialization.FullVcapEnvFieldFupplier</contextFieldSupplier>
8+
<contextFieldSupplier>com.sap.hcp.cf.logging.common.serialization.FullVcapEnvFieldSupplier</contextFieldSupplier>
99
<customFieldMdcKeyName>custom-field</customFieldMdcKeyName>
1010
<customFieldMdcKeyName>test-field</customFieldMdcKeyName>
1111
<customFieldMdcKeyName>retained-field</customFieldMdcKeyName>

0 commit comments

Comments
 (0)