com.ecyrd.speed4j.log
Class Slf4jLog

java.lang.Object
  extended by com.ecyrd.speed4j.log.Log
      extended by com.ecyrd.speed4j.log.Slf4jLog
Direct Known Subclasses:
PeriodicalLog

public class Slf4jLog
extends Log

A simple logger which does nothing except write the stopwatch data to the given SLF4J logger using Logger.info(String).


Field Summary
protected  org.slf4j.Logger m_log
          Stores the SLF4J logger instance.
 
Constructor Summary
Slf4jLog()
           
 
Method Summary
 void log(StopWatch sw)
          Logs using the INFO priority.
 void setSlf4jLogname(String logName)
          Set the name of the logger that this logger should log to.
 
Methods inherited from class com.ecyrd.speed4j.log.Log
getName, isEnabled, setEnable, setName, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_log

protected org.slf4j.Logger m_log
Stores the SLF4J logger instance.

Constructor Detail

Slf4jLog

public Slf4jLog()
Method Detail

setSlf4jLogname

public void setSlf4jLogname(String logName)
Set the name of the logger that this logger should log to.


log

public void log(StopWatch sw)
Logs using the INFO priority.

Specified by:
log in class Log
Parameters:
sw - The StopWatch to log.


Copyright © 2011. All Rights Reserved.