com.itextpdf.text.log
Class LoggerFactory

java.lang.Object
  extended by com.itextpdf.text.log.LoggerFactory

public class LoggerFactory
extends Object

LoggerFactory can be used to set a logger. The logger should be created by implementing Logger. 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

Author:
redlab_b

Method Summary
static LoggerFactory getInstance()
          Returns the LoggerFactory
static Logger getLogger(Class<?> klass)
          Returns the logger set in this LoggerFactory.
static Logger getLogger(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLogger

public static Logger getLogger(Class<?> klass)
Returns the logger set in this LoggerFactory. Defaults to NoOpLogger

Parameters:
klass -
Returns:
the logger.

getLogger

public static Logger getLogger(String name)
Returns the logger set in this LoggerFactory. Defaults to NoOpLogger

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


Copyright © 2013. All Rights Reserved.