Code example for LogRecord

Methods: getLevel, getMillis, getParameters

0
	@Override 
	public synchronized String format(LogRecord record)
	{ 
		String logFormat = null;
		String message = formatMessage(record);
		if (record.getParameters() != null && record.getParameters().length > 0)
		{ 
			Object param = record.getParameters()[0];
			if (param instanceof ILogFormatProvider)
				logFormat = ((ILogFormatProvider) param).getLogFormat();
		} 
		return String.format(
			logFormat + '\n',
			datestamp.print(record.getMillis()),
			timestamp.print(record.getMillis()),
			handler.colorize(record.getLevel()),
			message
		); 
	} 
 
	private final LogFileHandler handler;