LogManager { String errorCode(Throwable e) { return e instanceof ErrorCode ? ((ErrorCode) e).errorCode() : e.getClass().getCanonicalName(); }  ActionLog begin(String message, String id); void end(String message); void logError(Throwable e); void maskFields(String... fields); static final ThreadLocal<ActionLog> CURRENT_ACTION_LOG; static final String APP_NAME; static final IdGenerator ID_GENERATOR; public LogAppender appender; }
@Test void errorCode() { assertThat(logManager.errorCode(new TestException())).isEqualTo("TEST_ERROR"); assertThat(logManager.errorCode(new Exception())).isEqualTo("java.lang.Exception"); }