debug.LogBuffer Extends
Creates the log buffer.

Inheritance

Constructor

goog.debug.LogBuffer()

Instance Methods

Public Protected Private
addRecord(levelmsgloggerName) !goog.debug.LogRecord
Adds a log record to the buffer, possibly overwriting the oldest record.
Arguments:
level : goog.debug.Logger.Level
One of the level identifiers.
msg : string
The string message.
loggerName : string
The name of the source logger.
Returns: !goog.debug.LogRecord  The log record.
code »
clear()
Removes all buffered log records.
code »
forEachRecord(func)
Calls the given function for each buffered log record, starting with the oldest one.
Arguments:
func : function(!goog.debug.LogRecord)
The function to call.
code »

Instance Properties

buffer_ :
The array to store the records.
Code »
curIndex_ :
The index of the most recently added record or -1 if there are no records.
Code »
isFull_ :
Whether the buffer is at capacity.
Code »

Static Methods

goog.debug.LogBuffer.getInstance() !goog.debug.LogBuffer
A static method that always returns the same instance of LogBuffer.
Returns: !goog.debug.LogBuffer  The LogBuffer singleton instance.
code »
goog.debug.LogBuffer.isBufferingEnabled() boolean
No description.
Returns: boolean  Whether the log buffer is enabled.
code »

Static Properties

goog.debug.LogBuffer.CAPACITY :
No description.
Code »
goog.debug.LogBuffer.instance_ : goog.debug.LogBuffer
No description.
Code »

Package debug

Package Reference