private static void initialise(Level logLevel,
			boolean writeToApplicationLogs, boolean writeToStandardOutput) {

		if (writeToApplicationLogs) {

			Level applicationLogLevel = Logger.getRootLogger().getLevel();

			// do not write to the logs by default
			writeToApplicationLogs = false;

			if (applicationLogLevel == null) {

				// never write to the logs if the log level is not configured

			} else if (applicationLogLevel == Level.OFF
					|| logLevel == Level.OFF) {

				// never write to the logs if the log level is 'off'

			} else if (applicationLogLevel == Level.ALL
					|| logLevel == Level.ALL) {

				// always write to the logs if the log level is 'all'
				writeToApplicationLogs = true;

			} else if (applicationLogLevel == Level.TRACE) {

				if (logLevel == Level.TRACE || logLevel == Level.DEBUG
						|| logLevel == Level.INFO || logLevel == Level.WARN
						|| logLevel == Level.ERROR || logLevel == Level.FATAL) {

					writeToApplicationLogs = true;

				}

			} else if (applicationLogLevel == Level.DEBUG) {

				if (logLevel == Level.DEBUG || logLevel == Level.INFO
						|| logLevel == Level.WARN || logLevel == Level.ERROR
						|| logLevel == Level.FATAL) {

					writeToApplicationLogs = true;

				}

			} else if (applicationLogLevel == Level.INFO) {

				if (logLevel == Level.INFO || logLevel == Level.WARN
						|| logLevel == Level.ERROR || logLevel == Level.FATAL) {

					writeToApplicationLogs = true;

				}

			} else if (applicationLogLevel == Level.WARN) {

				if (logLevel == Level.WARN || logLevel == Level.ERROR
						|| logLevel == Level.FATAL) {

					writeToApplicationLogs = true;

				}

			} else if (applicationLogLevel == Level.ERROR) {

				if (logLevel == Level.ERROR || logLevel == Level.FATAL) {

					writeToApplicationLogs = true;

				}

			} else if (applicationLogLevel == Level.FATAL) {

				if (logLevel == Level.FATAL) {

					writeToApplicationLogs = true;

				}

			}

		}

		Canary.logLevel = logLevel;
		Canary.writeToApplicationLogs = writeToApplicationLogs;
		Canary.writeToStandardOutput = writeToStandardOutput;

		if (writeToApplicationLogs || writeToStandardOutput) {

			muted = null;

		} else {

			muted = true;

		}

	}