Code example for LogRecord

Methods: getSequenceNumbersetParameterssetThrown

0
public class JDKHandler implements LogHandler<Logger> {
 
	@Override 
	public void logEvent(Logger logger, LogEvent e) {
		Level level = JDKLevelTranslator.$.fromLogMachine(e.getLevel());
		LogRecord lr = new LogRecord(level, e.getFormattedMessage());
		lr.setThrown(e.getCause());
		lr.setParameters(e.getReplacements());
 
		Switchboard.put(e, "_"+lr.getSequenceNumber());
		logger.log(lr);
	} 
 
	@Override 
	public String getLoggerName(Logger logger) {
		return logger.getName();
	} 
 
	@Override 
	public unquietcode.tools.logmachine.core.Level getLevel(Logger logger) {