JBoss Logging Programming Interface 2.2.0.CR2-SNAPSHOT

org.jboss.logging
Class AbstractLoggerPluginInstance

java.lang.Object
  extended by org.jboss.logging.AbstractLoggerPluginInstance
All Implemented Interfaces:
LoggerPluginInstance
Direct Known Subclasses:
NullLoggerPluginInstance

public abstract class AbstractLoggerPluginInstance
extends Object
implements LoggerPluginInstance

An abstract base class for logger plugin instances.


Constructor Summary
protected AbstractLoggerPluginInstance(String name, String resourceBundleName, LoggerPlugin loggerPlugin)
          Construct a new instance.
 
Method Summary
 Logger getLogger()
          Get the logger API instance associated with this plugin instance.
 LoggerPlugin getLoggerPlugin()
           
 void log(Logger.Level level, String loggerFqcn, Object message, Object[] params, Throwable t)
          Log a message at the given level using messageformat formatting.
protected  void log(Logger.Level level, String loggerFqcn, String message, Throwable t)
          Simple log method.
 void logf(Logger.Level level, String loggerFqcn, String format, Object[] params, Throwable t)
          Log a message at the given level using printf formatting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.logging.LoggerPluginInstance
isEnabled
 

Constructor Detail

AbstractLoggerPluginInstance

protected AbstractLoggerPluginInstance(String name,
                                       String resourceBundleName,
                                       LoggerPlugin loggerPlugin)
Construct a new instance.

Parameters:
name - the logger name
resourceBundleName - the resource bundle name
loggerPlugin -
Method Detail

getLoggerPlugin

public LoggerPlugin getLoggerPlugin()
Specified by:
getLoggerPlugin in interface LoggerPluginInstance

getLogger

public Logger getLogger()
Get the logger API instance associated with this plugin instance.

Specified by:
getLogger in interface LoggerPluginInstance
Returns:
the logger instance

logf

public void logf(Logger.Level level,
                 String loggerFqcn,
                 String format,
                 Object[] params,
                 Throwable t)
Log a message at the given level using printf formatting.

Specified by:
logf in interface LoggerPluginInstance
Parameters:
level - the level
loggerFqcn - the fully qualified class name
format - the message format
params - the message parameters or null if none
t - the throwable cause or null if none

log

public void log(Logger.Level level,
                String loggerFqcn,
                Object message,
                Object[] params,
                Throwable t)
Log a message at the given level using messageformat formatting.

Specified by:
log in interface LoggerPluginInstance
Parameters:
level - the level
loggerFqcn - the fully qualified class name
message - the message
params - the message parameters or null if none
t - the throwable cause or null if none

log

protected void log(Logger.Level level,
                   String loggerFqcn,
                   String message,
                   Throwable t)
Simple log method. Implemented by logger plugins which do not have any special formatting support.

Parameters:
level - the level
loggerFqcn - the logger class name
message - the log message
t - the throwable cause

JBoss Logging Programming Interface 2.2.0.CR2-SNAPSHOT

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.