formatter.js
No description.

File Location

/goog/debug/formatter.js

Classes

goog.debug.Formatter
Base class for Formatters. A Formatter is used to format a LogRecord into something that can be displayed to the user.
goog.debug.HtmlFormatter
Formatter that returns formatted html. See formatRecord for the classes it uses for various types of formatted output.
goog.debug.TextFormatter
Formatter that returns formatted plain text

Public Protected Private

Global Functions

goog.debug.Formatter.getDateTimeStamp_(logRecord) string
Returns a string for the time/date of the LogRecord.
Arguments:
logRecord : goog.debug.LogRecord
The record to get a time stamp for.
Returns: string  A string representation of the time/date of the LogRecord.
code »
goog.debug.Formatter.getRelativeTime_(logRecordrelativeTimeStart) string
Returns a string for the number of seconds relative to the start time. Prepads with spaces so that anything less than 1000 seconds takes up the same number of characters for better formatting.
Arguments:
logRecord : goog.debug.LogRecord
The log to compare time to.
relativeTimeStart : number
The start time to compare to.
Returns: string  The number of seconds of the LogRecord relative to the start time.
code »
goog.debug.Formatter.getTwoDigitString_(n) string
Returns the number as a two-digit string, meaning it prepends a 0 if the number if less than 10.
Arguments:
n : number
The number to format.
Returns: string  A two-digit string representation of n.
code »

Directory debug

File Reference