Home

# Class goog.debug.Formatter

Base class for Formatters. A Formatter is used to format a LogRecord into something that can be displayed to the user.

Instance Method Summary
| `formatRecord(?goog.debug.LogRecord logRecord) ⇒ string` Formats a record
| `getStartTimeProvider() ⇒ ?goog.debug.RelativeTimeProvider` Returns the start time provider. By default, this is the default instance but can be changed.
| `resetRelativeTimeStart()` Resets the start relative time.
| `setStartTimeProvider(?goog.debug.RelativeTimeProvider provider)` Sets the start time provider. By default, this is the default instance but can be changed.

Static Method Summary
| `getDateTimeStamp_(?goog.debug.LogRecord logRecord) ⇒ string` Returns a string for the time/date of the LogRecord.
| `getRelativeTime_(?goog.debug.LogRecord logRecord, number relativeTimeStart) ⇒ 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.
| `getTwoDigitString_(number n) ⇒ string` Returns the number as a two-digit string, meaning it prepends a 0 if the number if less than 10.