package me.allenz.androidapplog;

import java.text.SimpleDateFormat;
import java.util.Date;

public class LogEvent {

	private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss.SSS";

	private long time;

	private LogLevel level;

	private String tag;

	private String message;

	public LogEvent(final LogLevel level, final String tag, final String message) {
		this(System.currentTimeMillis(), level, tag, message);
	}

	public LogEvent(final long millis, final LogLevel level, final String tag,
			final String message) {
		this.time = millis;
		this.level = level;
		this.tag = tag;
		this.message = message;
	}

	public long getTime() {
		return time;
	}

	public LogLevel getLevel() {
		return level;
	}

	public String getTag() {
		return tag;
	}

	public String getMessage() {
		return message;
	}

	@Override
	public String toString() {
		final SimpleDateFormat formatter = new SimpleDateFormat(DATE_FORMAT);
		final StringBuilder sb = new StringBuilder();
		sb.append(formatter.format(new Date(time))).append("\t");
		sb.append(level.toString()).append("\t");
		sb.append(tag).append("\t");
		sb.append(message).append("\n");
		return sb.toString();
	}
}

@@ -111,16 +111,66 @@
 vent %7B%0A%0A
+%09private static final String DELIMITER = %22    %22;%0A%0A
 %09private
@@ -1058,36 +1058,41 @@
 (time))).append(
-%22%5Ct%22
+DELIMITER
 );%0A%09%09sb.append(l
@@ -1107,36 +1107,41 @@
 tring()).append(
-%22%5Ct%22
+DELIMITER
 );%0A%09%09sb.append(t
@@ -1155,12 +1155,17 @@
 end(
-%22%5Ct%22
+DELIMITER
 );%0A%09
@@ -1187,21 +1187,8 @@
 age)
-.append(%22%5Cn%22)
 ;%0A%09%09

use 4 spaces instead of tab as delimiter