@Test public void testFormat_null() { LogFormatter formatter = new LogFormatter(true); assertThat(formatter.format(null), is("null")); }
public <Message extends PMessage<Message, Field>, Field extends PField> String format(Message message) { ByteArrayOutputStream out = new ByteArrayOutputStream(); formatTo(out, message); return new String(out.toByteArray(), StandardCharsets.UTF_8); }
LogFormatter { public <Message extends PMessage<Message, Field>, Field extends PField> String format(Message message) { ByteArrayOutputStream out = new ByteArrayOutputStream(); formatTo(out, message); return new String(out.toByteArray(), StandardCharsets.UTF_8); } }
LogFormatter { public <Message extends PMessage<Message, Field>, Field extends PField> String format(Message message) { ByteArrayOutputStream out = new ByteArrayOutputStream(); formatTo(out, message); return new String(out.toByteArray(), StandardCharsets.UTF_8); } LogFormatter(FieldHandler... fieldHandlers);  LogFormatter(boolean pretty, FieldHandler... fieldHandlers);  LogFormatter(boolean pretty, Collection<FieldHandler> fieldHandlers); }
LogFormatter { public <Message extends PMessage<Message, Field>, Field extends PField> String format(Message message) { ByteArrayOutputStream out = new ByteArrayOutputStream(); formatTo(out, message); return new String(out.toByteArray(), StandardCharsets.UTF_8); } LogFormatter(FieldHandler... fieldHandlers);  LogFormatter(boolean pretty, FieldHandler... fieldHandlers);  LogFormatter(boolean pretty, Collection<FieldHandler> fieldHandlers); void formatTo(OutputStream out, Message message); String format(Message message); }
LogFormatter { public <Message extends PMessage<Message, Field>, Field extends PField> String format(Message message) { ByteArrayOutputStream out = new ByteArrayOutputStream(); formatTo(out, message); return new String(out.toByteArray(), StandardCharsets.UTF_8); } LogFormatter(FieldHandler... fieldHandlers);  LogFormatter(boolean pretty, FieldHandler... fieldHandlers);  LogFormatter(boolean pretty, Collection<FieldHandler> fieldHandlers); void formatTo(OutputStream out, Message message); String format(Message message);  }