Code example for Logger

Methods: addHandler

0
	 */ 
	protected AndroidLogger(Context context, String token) {
		this.context = context;
		logger = Logger.getLogger("root");
		le = new LogentriesAndroid(token, true);
		logger.addHandler(le);
		//logList = new ArrayList<String>(); 
		//getSavedLogs(); 
	} 
 
	/** 
	 * Singleton - only one Logger object allowed 
	 * @param context <i>getApplicationContext()</i> in Activity 
	 * @param token uuid corresponding to logfile on Logentries 
	 * @return an instance of the Logger object 
	 */ 
	public static synchronized AndroidLogger getLogger(Context context, String token) {
		if(loggerInstance == null) {
			loggerInstance = new AndroidLogger(context, token);
		} 
		return loggerInstance;