org.apache.cactus.util.log
Class LogService
java.lang.Object
|
+--org.apache.cactus.util.log.LogService
- public class LogService
- extends java.lang.Object
Logging service acting as a wrapper around the Jakarta Log4j logging
framework.
- Version:
- $Id: LogService.java,v 1.8 2001/09/14 20:21:11 pier Exp $
- Author:
- Vincent Massol
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstance
public static LogService getInstance()
- Returns:
- the unique singleton instance
init
public void init(java.lang.String theFileName)
- Initialize the logging system. Need to be called once before calling
getLog()
.
- Parameters:
theFileName
- the file name (Ex: "/log_client.properties") or null
to initialize a dummy logging system, meaning that all log calls
will have no effect. This is useful for unit testing for
instance where the goal is not to verify that logs are printed.
getLog
public Log getLog(java.lang.String theCategoryName)
- Parameters:
theCategoryName
- the category's name. Usually, it is the full
name of the class being logged, including the package name- Returns:
- the
Log
instance associated with the specified
category name
isInitialized
public boolean isInitialized()
- Returns:
- true if the logging system has already been initialized.
Copyright © 2000-2001 Apache Software Foundation. All Rights Reserved.