| Method from org.jboss.logging.Logger Detail: |
public void debug(Object message) {
loggerDelegate.debug(message);
}
Issue a log msg with a level of DEBUG.
Invokes log.log(Level.DEBUG, message); |
public void debug(Object message,
Throwable t) {
loggerDelegate.debug(message, t);
}
Issue a log msg and throwable with a level of DEBUG.
Invokes log.log(Level.DEBUG, message, t); |
public void error(Object message) {
loggerDelegate.error(message);
}
Issue a log msg with a level of ERROR.
Invokes log.log(Level.ERROR, message); |
public void error(Object message,
Throwable t) {
loggerDelegate.error(message, t);
}
Issue a log msg and throwable with a level of ERROR.
Invokes log.log(Level.ERROR, message, t); |
public void fatal(Object message) {
loggerDelegate.fatal(message);
}
Issue a log msg with a level of FATAL.
Invokes log.log(Level.FATAL, message); |
public void fatal(Object message,
Throwable t) {
loggerDelegate.fatal(message, t);
}
Issue a log msg and throwable with a level of FATAL.
Invokes log.log(Level.FATAL, message, t); |
protected static LoggerPlugin getDelegatePlugin(String name) {
LoggerPlugin plugin = null;
try
{
plugin = (LoggerPlugin) pluginClass.newInstance();
}
catch (Throwable e)
{
plugin = new NullLoggerPlugin();
}
try
{
plugin.init(name);
}
catch(Throwable e)
{
System.err.println("Failed to initalize pulgin: "+plugin);
plugin = new NullLoggerPlugin();
}
return plugin;
}
|
public static Logger getLogger(String name) {
return new Logger(name);
}
Create a Logger instance given the logger name. |
public static Logger getLogger(Class clazz) {
return new Logger(clazz.getName());
}
Create a Logger instance given the logger class. This simply
calls create(clazz.getName()). |
public static Logger getLogger(String name,
String suffix) {
return new Logger(name + "." + suffix);
}
|
public static Logger getLogger(Class clazz,
String suffix) {
return new Logger(clazz.getName() + "." + suffix);
}
|
public LoggerPlugin getLoggerPlugin() {
return this.loggerDelegate;
}
|
public String getName() {
return name;
}
Return the name of this logger. |
public static String getPluginClassName() {
return Logger.pluginClassName;
}
The LoggerPlugin implementation class name in use |
public void info(Object message) {
loggerDelegate.info(message);
}
Issue a log msg with a level of INFO.
Invokes log.log(Level.INFO, message); |
public void info(Object message,
Throwable t) {
loggerDelegate.info(message, t);
}
Issue a log msg and throwable with a level of INFO.
Invokes log.log(Level.INFO, message, t); |
protected static void init() {
try
{
// See if there is a PLUGIN_CLASS_PROP specified
if( pluginClassName == null )
{
pluginClassName = System.getProperty(PLUGIN_CLASS_PROP, LOG4J_PLUGIN_CLASS_NAME);
}
// Try to load the plugin via the TCL
ClassLoader cl = Thread.currentThread().getContextClassLoader();
pluginClass = cl.loadClass(pluginClassName);
}
catch (Throwable e)
{
// The plugin could not be setup, default to a null logger
pluginClass = org.jboss.logging.NullLoggerPlugin.class;
}
}
Initialize the LoggerPlugin class to use as the delegate to the
logging system. This first checks to see if a pluginClassName has
been specified via the #setPluginClassName(String) method,
then the PLUGIN_CLASS_PROP system property and finally the
LOG4J_PLUGIN_CLASS_NAME default. If the LoggerPlugin implementation
class cannot be loaded the default NullLoggerPlugin will be used. |
public boolean isDebugEnabled() {
return loggerDelegate.isDebugEnabled();
}
Check to see if the TRACE level is enabled for this logger. |
public boolean isInfoEnabled() {
return loggerDelegate.isInfoEnabled();
}
Check to see if the INFO level is enabled for this logger. |
public boolean isTraceEnabled() {
return loggerDelegate.isTraceEnabled();
}
Check to see if the TRACE level is enabled for this logger. |
public static void setPluginClassName(String pluginClassName) {
Logger.pluginClassName = pluginClassName;
}
Set the LoggerPlugin implementation class name in use |
public void trace(Object message) {
loggerDelegate.trace(message);
}
Issue a log msg with a level of TRACE.
Invokes log.log(XLevel.TRACE, message); |
public void trace(Object message,
Throwable t) {
loggerDelegate.trace(message, t);
}
Issue a log msg and throwable with a level of TRACE.
Invokes log.log(XLevel.TRACE, message, t); |
public void warn(Object message) {
loggerDelegate.warn(message);
}
Issue a log msg with a level of WARN.
Invokes log.log(Level.WARN, message); |
public void warn(Object message,
Throwable t) {
loggerDelegate.warn(message, t);
}
Issue a log msg and throwable with a level of WARN.
Invokes log.log(Level.WARN, message, t); |