org.asteriskjava.util
Class LogFactory
java.lang.Object
org.asteriskjava.util.LogFactory
public final class LogFactory
- extends java.lang.Object
Facade to hide details of the underlying logging system.
If you want to reuse Asterisk-Java's logging abstraction layer
add a private attribute to your class like this:
private final Log logger = LogFactory.getLog(getClass());
and then use the methods defined in Log
:
logger.error("Unable to create new instance of " + eventClass, ex);
Asterisk-Java's logging abstraction layer uses log4j when available
and falls back to java.util.logging otherwise.
- Version:
- $Id: LogFactory.java 959 2008-02-02 23:56:59Z srt $
- Author:
- srt
Method Summary |
static Log |
getLog(java.lang.Class clazz)
Returns an instance of Log suitable for logging from the given class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LogFactory
public LogFactory()
getLog
public static Log getLog(java.lang.Class clazz)
- Returns an instance of Log suitable for logging from the given class.
- Parameters:
clazz
- the class to create the logger for.
- Returns:
- the created logger.
Copyright © 2004-2009 Stefan Reuter. All Rights Reserved.