com.gargoylesoftware.htmlunit
Class WebConsole

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.WebConsole

public class WebConsole
extends Object

This class can be used to print messages to the logger. The first parameter can be a message-object containing format specifiers such as ("%o", "%s", "%d", "%i", "%f"). The logging methods are null-safe, so if the number of format specifiers and the numbers of parameters don't match, no exception is thrown. The default logger uses Apache Commons Logging.

Version:
$Revision: 8931 $
Author:
Andrea Martino

Nested Class Summary
static interface WebConsole.Formatter
          This interface can be implemented by clients that want to customize the way parameters and objects are logged.
static interface WebConsole.Logger
          A simple logging interface abstracting logging APIs.
 
Constructor Summary
WebConsole()
           
 
Method Summary
 void debug(Object... args)
          Prints the passed objects using logger debug level.
 void error(Object... args)
          Prints the passed objects using logger error level.
 WebConsole.Formatter getFormatter()
          Returns the current Formatter.
 WebConsole.Logger getLogger()
          Returns the current Logger.
 void info(Object... args)
          Prints the passed objects using logger info level.
 void setFormatter(WebConsole.Formatter formatter)
          Sets the Formatter.
 void setLogger(WebConsole.Logger logger)
          Sets the Logger_.
 void trace(Object... args)
          Prints the passed objects using logger trace level.
 void warn(Object... args)
          Prints the passed objects using logger warn level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebConsole

public WebConsole()
Method Detail

setFormatter

public void setFormatter(WebConsole.Formatter formatter)
Sets the Formatter.

Parameters:
formatter - the formatter

getFormatter

public WebConsole.Formatter getFormatter()
Returns the current Formatter.

Returns:
the Formatter

setLogger

public void setLogger(WebConsole.Logger logger)
Sets the Logger_.

Parameters:
logger - the logger

getLogger

public WebConsole.Logger getLogger()
Returns the current Logger.

Returns:
the logger

trace

public void trace(Object... args)
Prints the passed objects using logger trace level.

Parameters:
args - the logging parameters

debug

public void debug(Object... args)
Prints the passed objects using logger debug level.

Parameters:
args - the logging parameters

info

public void info(Object... args)
Prints the passed objects using logger info level.

Parameters:
args - the logging parameters

warn

public void warn(Object... args)
Prints the passed objects using logger warn level.

Parameters:
args - the logging parameters

error

public void error(Object... args)
Prints the passed objects using logger error level.

Parameters:
args - the logging parameters


Copyright © 2002–2014 Gargoyle Software Inc.. All rights reserved.