Package org.htmlunit
Class WebConsole
java.lang.Object
org.htmlunit.WebConsole
- All Implemented Interfaces:
Serializable
,org.htmlunit.corejs.javascript.NativeConsole.ConsolePrinter
public class WebConsole
extends Object
implements org.htmlunit.corejs.javascript.NativeConsole.ConsolePrinter, Serializable
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.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
A simple logging interface abstracting logging APIs. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the current Logger.void
print
(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.NativeConsole.Level level, Object[] args, org.htmlunit.corejs.javascript.ScriptStackElement[] stack) void
setLogger
(WebConsole.Logger logger) Sets the Logger_.
-
Constructor Details
-
WebConsole
public WebConsole()
-
-
Method Details
-
setLogger
Sets the Logger_.- Parameters:
logger
- the logger
-
getLogger
Returns the current Logger.- Returns:
- the logger
-
print
public void print(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.NativeConsole.Level level, Object[] args, org.htmlunit.corejs.javascript.ScriptStackElement[] stack) - Specified by:
print
in interfaceorg.htmlunit.corejs.javascript.NativeConsole.ConsolePrinter
-