jpl.mipl.pgs.utils.logging
Class LoggerFactory

java.lang.Object
  extended by jpl.mipl.pgs.utils.logging.LoggerFactory

public class LoggerFactory
extends Object

For obtaining system wide and process log4j logger.

Author:
Raj Patel

      Copyright 2004-2006, California Institute of Technology.
      ALL RIGHTS RESERVED.
      U.S. Government Sponsorship acknowledge.
  

Constructor Summary
LoggerFactory()
           
 
Method Summary
static void configureLog4J()
          Looks for Configuration.LOG4J_CONFIG_FILE_NAME in System properties.
static org.apache.log4j.Logger getLog4JLogger(String name)
          Returns logger with the given name.
static org.apache.log4j.Logger getLog4JNotificationLogger()
          Returns logger with name specified by value of the system property Configuration.LOG4J_SERVER_LOGGER_NAME or root logger if the property is not set.
static org.apache.log4j.Logger getLog4JProcessLogger()
          Returns logger with name specified by value of the system property Configuration.LOG4J_PROCESS_LOGGER_NAME or root logger if the property is not set.
static org.apache.log4j.Logger getLog4JProcessLogger(String caller)
           
static org.apache.log4j.Logger getLog4JServerLogger()
          Returns logger with name specified by value of the system property Configuration.LOG4J_SERVER_LOGGER_NAME or root logger if the property is not set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggerFactory

public LoggerFactory()
Method Detail

configureLog4J

public static void configureLog4J()
Looks for Configuration.LOG4J_CONFIG_FILE_NAME in System properties. If not found, Configuration.LOG4J_CONFIG_FILE_NAME in ${PGS_CONFIG_DIR} is used. ${PGS_CONFIG_DIR} may be specified at runtime (using Java's -D option). The default value of ${PGS_CONFIG_DIR} is ${V2JAVA}/jpl/mipl/pgs/config/. If ${V2JAVA} is not defined, no configuration is performed.


getLog4JProcessLogger

public static org.apache.log4j.Logger getLog4JProcessLogger()
Returns logger with name specified by value of the system property Configuration.LOG4J_PROCESS_LOGGER_NAME or root logger if the property is not set.


getLog4JProcessLogger

public static org.apache.log4j.Logger getLog4JProcessLogger(String caller)

getLog4JServerLogger

public static org.apache.log4j.Logger getLog4JServerLogger()
Returns logger with name specified by value of the system property Configuration.LOG4J_SERVER_LOGGER_NAME or root logger if the property is not set.


getLog4JNotificationLogger

public static org.apache.log4j.Logger getLog4JNotificationLogger()
Returns logger with name specified by value of the system property Configuration.LOG4J_SERVER_LOGGER_NAME or root logger if the property is not set.


getLog4JLogger

public static org.apache.log4j.Logger getLog4JLogger(String name)
Returns logger with the given name. If name is null, returns root logger.