The goog.debug.Console Class

goog.debug.Console()

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

.addFilter(loggerName)

Adds a logger name to be filtered.

loggerName {string}
the logger name to add.

.addLogRecord(logRecord)

Adds a log record.

logRecord {goog.debug.LogRecord}
The log entry.

.autoInstall()

Install the console and start capturing if "Debug=true" is in the page URL

.getFormatter()

Returns the text formatter used by this console

returns {!goog.debug.TextFormatter}
The text formatter.

.instance {goog.debug.Console}

Global console logger instance

.removeFilter(loggerName)

Removes a logger name to be filtered.

loggerName {string}
the logger name to remove.

.setCapturing(capturing)

Sets whether we are currently capturing logger output.

capturing {boolean}
Whether to capture logger output.

.show()

Show an alert with all of the captured debug information. Information is only captured if console is not available