JBoss Logging Programming Interface 2.2.0.CR2-SNAPSHOT

org.jboss.logging
Class NullLoggerPluginInstance

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

public class NullLoggerPluginInstance
extends AbstractLoggerPluginInstance

LoggerPlugin implementation producing no output at all. Used for client side logging when no log4j.jar is available on the classpath.

Version:
$Revision: 3403 $
Author:
Sacha Labourey., David M. Lloyd
See Also:
Logger, LoggerPluginInstance

Constructor Summary
NullLoggerPluginInstance(String name, LoggerPlugin loggerPlugin)
          Construct a new instance.
 
Method Summary
 boolean isEnabled(Logger.Level level)
          Determine whether logging is enabled for the given level.
 void log(Logger.Level level, String loggerFqcn, Object message, Object[] params, Throwable t)
          Log a message at the given level using messageformat formatting.
 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 org.jboss.logging.AbstractLoggerPluginInstance
getLogger, getLoggerPlugin, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullLoggerPluginInstance

public NullLoggerPluginInstance(String name,
                                LoggerPlugin loggerPlugin)
Construct a new instance.

Parameters:
name - the logger name to use
loggerPlugin -
Method Detail

isEnabled

public boolean isEnabled(Logger.Level level)
Determine whether logging is enabled for the given level.

Parameters:
level - the level
Returns:
false if logging is disabled, or true if logging is enabled or cannot be ascertained

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
Overrides:
logf in class AbstractLoggerPluginInstance
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
Overrides:
log in class AbstractLoggerPluginInstance
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

JBoss Logging Programming Interface 2.2.0.CR2-SNAPSHOT

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