LoggerRt (String category) { try { final Object logger = getLogger(category); return new LoggerRt() { @Override public void info(@Nullable String message, @Nullable Throwable t) { try { ReflectionBasedFactory.this.info(message, t, logger); } catch (Exception ignored) { } } @Override public void warn(@Nullable String message, @Nullable Throwable t) { try { ReflectionBasedFactory.this.warn(message, t, logger); } catch (Exception ignored) { } } @Override public void error(@Nullable String message, @Nullable Throwable t) { try { ReflectionBasedFactory.this.error(message, t, logger); } catch (Exception ignored) { } } }; } catch (Exception e) { throw new RuntimeException(e); } }