private void logFailure(DirectoryFailureEvent<?> event) {
        DirectoryEvent.Operation op = event.getOperation();
        switch (op) {

            case GET:
                if (event.getFailure() instanceof GuacamoleResourceNotFoundException)
                    logger.debug("{} failed to access/retrieve {}: {}", new RequestingUser(event), new AffectedObject(event), new Failure(event));
                else
                    logger.info("{} failed to access/retrieve {}: {}", new RequestingUser(event), new AffectedObject(event), new Failure(event));
                break;

            case ADD:
                logger.info("{} failed to create {}: {}", new RequestingUser(event), new AffectedObject(event), new Failure(event));
                break;

            case UPDATE:
                logger.info("{} failed to update {}: {}", new RequestingUser(event), new AffectedObject(event), new Failure(event));
                break;

            case REMOVE:
                logger.info("{} failed to delete {}: {}", new RequestingUser(event), new AffectedObject(event), new Failure(event));
                break;

            default:
                logger.warn("DirectoryEvent operation type has no corresponding log message implemented: {}", op);
                logger.info("{} failed to perform an unknown action on {}: {}", new RequestingUser(event), new AffectedObject(event), new Failure(event));

        }
    }
Logs that an operation failed to be performed on an object within a
Directory.

@param event
    The event describing the operation that failed.
guacamole/src/main/java/org/apache/guacamole/event/EventLoggingListener.java