deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.framework.log
Class LoggerFactory

java.lang.Object
  extended by org.deegree.framework.log.LoggerFactory

public final class LoggerFactory
extends java.lang.Object

The LoggerFactory is used to get a concrete logging service. The logging service can be provided by the application server or a 3rd party logging service such as Apache log4j. The logging service is configured by a set of Properties which are provided to the class init.

There are some global properties as well:

To use the Log4J logging framework set this property: log.class=org.deegree_impl.log.Log4JLogger Other supported logging facilites are the Java logging API with org.deegree_impl.log.JavaLogger (default), and JBoss Logserver with org.deegree_impl.log.JBossLogger.

Example Code: public class MyClass {
private static ILogger logger = LoggerFactory.getLogger(this.getClass());
...
public void doSomething() {
logger.logDebug("have done something");
}

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Torsten Friebe , last edited by: $Author: mschneider $
See Also:
ILogger

Method Summary
static ILogger getLogger(java.lang.Class<?> name)
          Return the named logger for the given class
static ILogger getLogger(java.lang.String name)
          Factory method to retrieve the instance of the concrete logging class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLogger

public static final ILogger getLogger(java.lang.String name)
Factory method to retrieve the instance of the concrete logging class. Return the named logger for the given name.

Parameters:
name - of the logger
Returns:
the assigned logger

getLogger

public static final ILogger getLogger(java.lang.Class<?> name)
Return the named logger for the given class

Parameters:
name - the class to be logged
Returns:
the assigned logger

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org