HexThreadIdPatternConverter extends LogEventPatternConverter { @Override public void format(final LogEvent event, final StringBuilder toAppendTo) { toAppendTo.append("0x").append(Long.toHexString(Thread.currentThread().getId())); } private  HexThreadIdPatternConverter(); static HexThreadIdPatternConverter newInstance(final String[] options); @Override void format(final LogEvent event, final StringBuilder toAppendTo);  }
@Test public void appendsCurrentThreadIdInHex() { converter.format(null, toAppendTo); assertThat(toAppendTo.toString()) .isEqualTo("0x" + Long.toHexString(Thread.currentThread().getId())); }