@Override
    public void append(final LogEvent event) {
        if(null == event.getMessage()) {
            return;
        }
        final StringBuilder buffer = new StringBuilder();
        buffer.append(new String(getLayout().toByteArray(event), StandardCharsets.UTF_8));
        if(ignoreExceptions()) {
            final Throwable thrown = event.getThrown();
            if(thrown != null) {
                buffer.append(Strings.LINE_SEPARATOR);
                final String[] trace = ExceptionUtils.getStackFrames(thrown);
                for(final String t : trace) {
                    buffer.append(t).append(Strings.LINE_SEPARATOR);
                }
            }
        }
        library.NSLog("%@", buffer.toString());
    }
@Test
    public void testAppend() {
        final SystemLogAppender a = new SystemLogAppender(PatternLayout.newBuilder().withPattern("%level - %m%n").build());
        a.append(new Log4jLogEvent.Builder().setLoggerName(SystemLogAppender.class.getCanonicalName()).setLevel(Level.ERROR).setThrown(new RuntimeException()).setMessage(new SimpleMessage("Test")).build());
    }