public final class LogFactory extends Object
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.
Modifier and Type | Method and Description |
---|---|
static Log |
getLog(Class<?> clazz)
Returns an instance of Log suitable for logging from the given class.
|
static void |
setClassLoader(ClassLoader classLoader) |
public static void setClassLoader(ClassLoader classLoader)
Copyright © 2004–2022. All rights reserved.