Code example for FileHandler

Methods: close, flush

0
	public static void disableCollectingLogs() { 
		logger.info("Disabled collecting logs.");
		if (fileHandler != null) {
			logger.removeHandler(fileHandler);
			 
			fileHandler.flush();
			fileHandler.close();
			 
			apiLogger.setUseParentHandlers(false);
			// Revert to regular log level. 
			setLogLevel(android.util.Log.INFO);
		} 
		logger.removeHandler(logcatHandler);
	} 
	 
	public static void wtf(final String tag, final String msg) {
		final String logMessage = format(tag, msg);
		if (LOG_LEVEL <= android.util.Log.ASSERT)
			android.util.Log.e(APP_TAG, logMessage);
		logger.severe(logMessage);
	}