private void logEvent(String logMessage) {
		switch (this.level) {
			case ERROR:
				if (logger.isErrorEnabled()) {
					logger.error(logMessage);
				}
				break;
			case WARN:
				if (logger.isWarnEnabled()) {
					logger.warn(logMessage);
				}
				break;
			case INFO:
				if (logger.isInfoEnabled()) {
					logger.info(logMessage);
				}
				break;
			case DEBUG:
				if (logger.isDebugEnabled()) {
					logger.debug(logMessage);
				}
				break;
			case TRACE:
				if (logger.isTraceEnabled()) {
					logger.trace(logMessage);
				}
				break;
		}
	}
A simple cache listener that will log events.

@author David Turanski
spring-xd-gemfire-server/src/main/java/org/springframework/xd/gemfire/server/LoggingCacheListener.java