14
14
* key/value pairs stored in {@link CustomField} instances which have been
15
15
* passed as arguments.
16
16
* <p>
17
- * We allow to types of addition to a log message, either <i>embedded</i>, i.e.
18
- * the key/value pairs appear as a list of JSON fields in the message, or as a
19
- * nested object where the field name has been specified as an option to this
20
- * converter.
17
+ * We allow two types of additions to a log message, either <i>embedded</i>,
18
+ * i.e. the key/value pairs appear as a list of JSON fields in the message, or
19
+ * as a nested object where the field name has been specified as an option to
20
+ * this converter.
21
21
*/
22
22
23
23
public class CustomFieldsConverter extends ClassicConverter {
@@ -42,8 +42,8 @@ public String convert(ILoggingEvent event) {
42
42
Map <String , String > mdcCustomFields = getMdcCustomFields (event );
43
43
StringBuilder appendTo = new StringBuilder ();
44
44
converter .convert (appendTo , mdcCustomFields , argumentArray );
45
- return appendTo .toString ();
46
- }
45
+ return appendTo .toString ();
46
+ }
47
47
48
48
private Map <String , String > getMdcCustomFields (ILoggingEvent event ) {
49
49
LogContext .loadContextFields ();
@@ -52,9 +52,9 @@ private Map<String, String> getMdcCustomFields(ILoggingEvent event) {
52
52
}
53
53
54
54
@ Override
55
- public void start () {
56
- converter .setFieldName (getFirstOption ());
55
+ public void start () {
56
+ converter .setFieldName (getFirstOption ());
57
57
customFieldsAdapter .initialize (getContext ());
58
- super .start ();
59
- }
58
+ super .start ();
59
+ }
60
60
}
0 commit comments