@Test public void singleCustomFieldArgument() throws Exception { StringBuilder sb = new StringBuilder(); when(event.getContextData()).thenReturn(new SortedArrayStringMap()); CustomField customField = customField("some key", "some value"); when(event.getMessage().getParameters()).thenReturn(new Object[] { customField }); converter.format(event, sb); verifyConverterCall(emptyMap(), is(sameInstance(customField))); }
@Override public void format(LogEvent event, StringBuilder appendTo) { converter.convert(appendTo, getCustomFieldsFromMdc(event), getMessageParameters(event)); }
CustomFieldsConverter extends LogEventPatternConverter { @Override public void format(LogEvent event, StringBuilder appendTo) { converter.convert(appendTo, getCustomFieldsFromMdc(event), getMessageParameters(event)); } }
CustomFieldsConverter extends LogEventPatternConverter { @Override public void format(LogEvent event, StringBuilder appendTo) { converter.convert(appendTo, getCustomFieldsFromMdc(event), getMessageParameters(event)); } CustomFieldsConverter(String[] options); }
CustomFieldsConverter extends LogEventPatternConverter { @Override public void format(LogEvent event, StringBuilder appendTo) { converter.convert(appendTo, getCustomFieldsFromMdc(event), getMessageParameters(event)); } CustomFieldsConverter(String[] options); static CustomFieldsConverter newInstance(final String[] options); @Override void format(LogEvent event, StringBuilder appendTo); }
CustomFieldsConverter extends LogEventPatternConverter { @Override public void format(LogEvent event, StringBuilder appendTo) { converter.convert(appendTo, getCustomFieldsFromMdc(event), getMessageParameters(event)); } CustomFieldsConverter(String[] options); static CustomFieldsConverter newInstance(final String[] options); @Override void format(LogEvent event, StringBuilder appendTo); static final String WORD; }