@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
    public void onEvent(@Observes LogEvent logEvent) {
        if (!this.enabled) {
            return;
        }
        LogRecord lr = new LogRecord(Level.OFF, String.format(logFormat, logEvent.getTimestamp(), logEvent.getSource(), logEvent.getMessage()));

        switch (logEvent.getSeverity()) {
            case INFO:
                lr.setLevel(Level.INFO);
                break;
            case ERROR:
                lr.setLevel(Level.SEVERE);
                break;
            case FINE:
                lr.setLevel(Level.FINE);
                break;
            case FINER:
                lr.setLevel(Level.FINER);
                break;
            case FINEST:
                lr.setLevel(Level.FINEST);
                break;
            case WARN:
                lr.setLevel(Level.WARNING);
                break;
            case CONFIG:
                lr.setLevel(Level.CONFIG);
                break;
            default:
                throw new AssertionError(logEvent.getSeverity().name());
        }
        lr.setMillis(logEvent.getTimestamp().getTime());
        lr.setThrown(logEvent.getCause());
        getLogger().log(lr);
    }