debug.Console Extends
Create and install a log handler that logs to window.console if available

Inheritance

Constructor

goog.debug.Console()

Instance Methods

Public Protected Private
addFilter(loggerName)
Adds a logger name to be filtered.
Arguments:
loggerName : string
the logger name to add.
code »
addLogRecord(logRecord)
Adds a log record.
Arguments:
logRecord : goog.debug.LogRecord
The log entry.
code »
getFormatter() !goog.debug.TextFormatter
Returns the text formatter used by this console
Returns: !goog.debug.TextFormatter  The text formatter.
code »
publishHandler_()
No description.
code »
removeFilter(loggerName)
Removes a logger name to be filtered.
Arguments:
loggerName : string
the logger name to remove.
code »
setCapturing(capturing)
Sets whether we are currently capturing logger output.
Arguments:
capturing : boolean
Whether to capture logger output.
code »

Instance Properties

filteredLoggers_ :
Loggers that we shouldn't output.
Code »
Formatter for formatted output.
Code »
isCapturing_ :
No description.
Code »
logBuffer_ :
No description.
Code »

Static Methods

goog.debug.Console.autoInstall()
Install the console and start capturing if "Debug=true" is in the page URL
code »
goog.debug.Console.logToConsole_(consolefnNamerecord)
Logs the record to the console using the given function. If the function is not available on the console object, the log function is used instead.
Arguments:
console : !Object
The console object.
fnName : string
The name of the function to use.
record : string
The record to log.
code »
goog.debug.Console.setConsole(console)
Sets the console to which to log.
Arguments:
console : !Object
The console to which to log.
code »
goog.debug.Console.show()
Show an alert with all of the captured debug information. Information is only captured if console is not available
code »

Static Properties

goog.debug.Console.console_ :
The console to which to log. This is a property so it can be mocked out in this unit test for goog.debug.Console.
Code »
goog.debug.Console.instance : goog.debug.Console
Global console logger instance
Code »

Package debug

Package Reference