Package com.itextpdf.text.log
Class LoggerFactory
- java.lang.Object
-
- com.itextpdf.text.log.LoggerFactory
-
public class LoggerFactory extends java.lang.Object
LoggerFactory 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 Logger
logger
private static LoggerFactory
myself
-
Constructor Summary
Constructors Modifier Constructor Description private
LoggerFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LoggerFactory
getInstance()
Returns the LoggerFactorystatic Logger
getLogger(java.lang.Class<?> klass)
Returns the logger set in this LoggerFactory.static Logger
getLogger(java.lang.String name)
Returns the logger set in this LoggerFactory.Logger
logger()
Get the logger.void
setLogger(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
-
-