public static void setupConsoleLogging() {
		Logger rootLogger = getRootLogger();
		consoleHandler.setLevel(Level.ALL);
		consoleHandler.setFormatter(new Formatter() {

			private StringBuffer recordBuffer = new StringBuffer();
			private DateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS Z");

			/**
			 * {@inheritDoc}
			 */
			@Override
			public synchronized String format(LogRecord record) {
				recordBuffer.setLength(0);
				String linePrefix = dateFormatter.format(new Date(record.getMillis())) + " [" + record.getLevel() + "] [" + Thread.currentThread().getName() + "] [" + record.getSourceClassName() + "." + record.getSourceMethodName() + "] ";
				recordBuffer.append(linePrefix).append(String.format(record.getMessage(), record.getParameters())).append('\n');
				if (record.getThrown() != null) {
					Throwable throwable = record.getThrown();
					boolean causedBy = false;
					while (throwable != null) {
						recordBuffer.append(linePrefix);
						if (causedBy) {
							recordBuffer.append("caused by: ");
						}
						recordBuffer.append(throwable.getClass().getName());
						if (throwable.getMessage() != null) {
							recordBuffer.append(": ").append(throwable.getMessage());
						}
						recordBuffer.append("\n");
						StackTraceElement[] stackTraceElements = throwable.getStackTrace();
						for (StackTraceElement stackTraceElement : stackTraceElements) {
							recordBuffer.append(linePrefix).append("  at ").append(stackTraceElement.getClassName()).append('.').append(stackTraceElement.getMethodName()).append("(").append(stackTraceElement.getFileName()).append(':').append(stackTraceElement.getLineNumber()).append(')').append("\n");
						}
						throwable = throwable.getCause();
						causedBy = true;
					}
				}
				return recordBuffer.toString();
			}
		});
		rootLogger.addHandler(consoleHandler);
	}