goog.debug
Namespacegoog.debug.Console
ClassCreate and install a log handler that logs to window.console if available … more
goog.debug.DebugWindow
ClassProvides a debug DebugWindow that is bound to the goog.debug.Logger. It handles log messages and writes them to the DebugWindow. This doesn't provide a lot of functionality that the old Gmail logging infrastructure provided like saving debug logs for exporting to the server. Now that we have an event-based logging infrastructure, we can encapsulate that functionality in a separate class. … more
goog.debug.DevCss
ClassA class for solving development CSS issues/emulating the CSS Compiler. … more
goog.debug.DivConsole
ClassA class for visualising logger calls in a div element. … more
goog.debug.EntryPointMonitor
Interfacegoog.debug.Error
ClassBase class for custom error objects. … more
goog.debug.ErrorHandler
ClassThe ErrorHandler can be used to to wrap functions with a try/catch statement. If an exception is thrown, the given error handler function will be called. When this object is disposed, it will stop handling exceptions and tracing. It will also try to restore window.setTimeout and window.setInterval if it wrapped them. Notice that in the general case, it is not technically possible to remove the wrapper, because functions have no knowledge of what they have been assigned to. So the app is responsible for other forms of unwrapping. … more
goog.debug.ErrorReporter
ClassConstructs an error reporter. Internal Use Only. To install an error reporter see the {@see #install} method below. … more
goog.debug.FancyWindow
ClassProvides a Fancy extension to the DebugWindow class. Allows filtering based on loggers and levels. … more
goog.debug.Formatter
ClassBase class for Formatters. A Formatter is used to format a LogRecord into something that can be displayed to the user. … more
goog.debug.FpsDisplay
ClassDisplays frames per seconds that the window this component is rendered in is animating at. … more
.GcDiagnostics
{goog.debug.GcDiagnostics_
}Singleton GcDiagnostics object
goog.debug.HtmlFormatter
ClassFormatter that returns formatted html. See formatRecord for the classes it uses for various types of formatted output. … more
goog.debug.LogBuffer
ClassCreates the log buffer. … more
goog.debug.LogManager
NamespaceThere is a single global LogManager object that is used to maintain a set of shared state about Loggers and log services. This is loosely based on the java class java.util.logging.LogManager. … more
goog.debug.LogRecord
ClassLogRecord objects are used to pass logging requests between the logging framework and individual log Handlers. … more
goog.debug.Logger
ClassThe Logger is an object used for logging debug messages. Loggers are normally named, using a hierarchical dot-separated namespace. Logger names can be arbitrary strings, but they should normally be based on the package name or class name of the logged component, such as goog.net.BrowserChannel. The Logger object is loosely based on the java class java.util.logging.Logger. It supports different levels of filtering for different loggers. The logger object should never be instantiated by application code. It should always use the goog.debug.Logger.getLogger function. … more
.MAX_STACK_DEPTH
{number
}Max length of stack to try and output
goog.debug.RelativeTimeProvider
ClassA simple object to keep track of a timestamp considered the start of something. The main use is for the logger system to maintain a start time that is occasionally reset. For example, in Gmail, we reset this relative time at the start of a user action so that timings are offset from the beginning of the action. This class also provides a singleton as the default behavior for most use cases is to share the same start time. … more
goog.debug.TextFormatter
ClassFormatter that returns formatted plain text … more
.Trace
{goog.debug.Trace_
}Singleton trace object
.catchErrors(logFunc, opt_cancel, opt_target)
Catches onerror events fired by windows and similar objects.
logFunc
{function
(Object
)}
opt_cancel
{boolean
=}
opt_target
{Object
=}
.deepExpose(obj, opt_showFn)
Creates a string representing a given primitive or object, and for an object, all its properties and nested objects. WARNING: If an object is given, it and all its nested objects will be modified. To detect reference cycles, this method identifies objects using goog.getUid() which mutates the object.
obj
{*}
opt_showFn
{boolean
=}
string
}
.devCssRunner
.enhanceError(err, opt_message)
Converts an object to an Error if it's a String, adds a stacktrace if there isn't one, and optionally adds an extra message.
err
{Error
|string
}
opt_message
{string
=}
Error
}
goog.debug.entryPointRegistry
Namespace.errorHandlerWeakDep
{Object
}Dummy object to work around undefined properties compiler warning.
.expose(obj, opt_showFn)
Creates a string representing an object and all its properties.
obj
{Object
|null
|undefined
}
opt_showFn
{boolean
=}
string
}
.exposeArray(arr)
Recursively outputs a nested array as a string.
arr
{Array
}
string
}
.exposeException(err, opt_fn)
Exposes an exception that has been caught by a try...catch and outputs the error with a stack trace.
err
{Object
}
opt_fn
{Function
=}
string
}
.getFunctionName(fn)
Gets a function name
fn
{Function
}
string
}
.getStacktrace(opt_fn)
Gets the current stack trace, either starting from the caller or starting from a specified function that's currently on the call stack.
opt_fn
{Function
=}
string
}
.getStacktraceSimple(opt_depth)
Gets the current stack trace. Simple and iterative - doesn't worry about catching circular references or getting the args.
opt_depth
{number
=}
string
}
goog.debug.logRecordSerializer
Namespace.makeWhitespaceVisible(string)
Makes whitespace visible by replacing it with printable characters. This is useful in finding diffrences between the expected and the actual output strings of a testcase.
string
{string
}
string
}
.normalizeErrorObject(err)
Normalizes the error/exception object between browsers.
err
{Object
}
Object
}
goog.debug.reflect
Namespace.setFunctionResolver(resolver)
Set a custom function name resolver.
resolver
{function
(Function
): string
}