com.intel.cosbench.log.log4j
Class Log4jLogManager
java.lang.Object
com.intel.cosbench.log.log4j.Log4jLogManager
- All Implemented Interfaces:
- LogManager
public class Log4jLogManager
- extends java.lang.Object
- implements LogManager
The wrapper of log4j LogManager, this log manager will create log file with maximum size of 10 MB,
and the maximum number of backup file is 10. The default log level is INFO.
- Author:
- ywang19
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Log4jLogManager
public Log4jLogManager()
dispose
public void dispose()
- Specified by:
dispose
in interface LogManager
getLogger
public Logger getLogger()
- Specified by:
getLogger
in interface LogManager
setLogLevel
public void setLogLevel(LogLevel level)
- Specified by:
setLogLevel
in interface LogManager
setLogFile
public void setLogFile(java.io.File dir,
java.lang.String filename,
boolean append,
boolean buffer)
throws java.io.IOException
- Specified by:
setLogFile
in interface LogManager
- Throws:
java.io.IOException
enableConsole
public void enableConsole()
- Specified by:
enableConsole
in interface LogManager
getLogAsString
public java.lang.String getLogAsString()
throws java.io.IOException
- Specified by:
getLogAsString
in interface LogManager
- Throws:
java.io.IOException