Code example for LogRecord

Methods: getLevelgetLoggerNamegetMessagegetSequenceNumber

0
		public String format(LogRecord r) {
			final String format = "%s/%s %d %s %s\r\n";
			final String date = DateFormat.getDateTimeInstance().format(new Date());
			 
			return String.format(format,
					r.getLevel(),
					r.getLoggerName(),
					r.getSequenceNumber(),
					date,
					r.getMessage());
		} 
	} 
	 
	private static class LogcatHandler extends Handler
	{ 
		@Override 
		public void publish(LogRecord r) {
			final Level level = r.getLevel();
			final String name = r.getLoggerName();
			final String msg = r.getMessage();
Stop searching for code, let great code find you!  Add Codota to your java IDE