public String format(LogRecord record) {
		StringBuffer sb = new StringBuffer();

		// time in format hh:mm:ss
		DateFormat dateFormat = DateFormat.getTimeInstance(DateFormat.MEDIUM);

		sb.append(dateFormat.format(new Date(System.currentTimeMillis())));
		sb.append(" ");
		sb.append(record.getLevel().getLocalizedName());
		sb.append(": ");
		sb.append(record.getLoggerName().replaceFirst("([a-z]\\w*\\.)*", ""));
		sb.append(": ");
		sb.append(formatMessage(record));
		sb.append("\n");
		// exception handling
		if (record.getThrown() != null) {
			try {
				StringWriter sw = new StringWriter();
				PrintWriter pw = new PrintWriter(sw);
				record.getThrown().printStackTrace(pw);
				pw.close();
				sb.append(sw.toString());
			} catch (Exception ex) {
			}
		}

		return sb.toString();
	}