Package com.itextpdf.text.log
Class LoggerFactory
- java.lang.Object
-
- com.itextpdf.text.log.LoggerFactory
-
public class LoggerFactory extends java.lang.ObjectLoggerFactory can be used to set a logger. The logger should be created by implementingLogger. In the implementation users can choose how they log received messages. Added for developers. For some cases it can be handy to receive logging statements while developing applications with iText
-
-
Field Summary
Fields Modifier and Type Field Description private Loggerloggerprivate static LoggerFactorymyself
-
Constructor Summary
Constructors Modifier Constructor Description privateLoggerFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LoggerFactorygetInstance()Returns the LoggerFactorystatic LoggergetLogger(java.lang.Class<?> klass)Returns the logger set in this LoggerFactory.static LoggergetLogger(java.lang.String name)Returns the logger set in this LoggerFactory.Loggerlogger()Get the logger.voidsetLogger(Logger logger)Set the global logger to process logging statements with.
-
-
-
Field Detail
-
myself
private static LoggerFactory myself
-
logger
private Logger logger
-
-
Method Detail
-
getLogger
public static Logger getLogger(java.lang.Class<?> klass)
Returns the logger set in this LoggerFactory. Defaults toNoOpLogger- Parameters:
klass-- Returns:
- the logger.
-
getLogger
public static Logger getLogger(java.lang.String name)
Returns the logger set in this LoggerFactory. Defaults toNoOpLogger- Parameters:
name-- Returns:
- the logger.
-
getInstance
public static LoggerFactory getInstance()
Returns the LoggerFactory- Returns:
- singleton instance of this LoggerFactory
-
setLogger
public void setLogger(Logger logger)
Set the global logger to process logging statements with.- Parameters:
logger- the logger
-
logger
public Logger logger()
Get the logger.- Returns:
- the logger
-
-