debug.LogRecord Extends
LogRecord objects are used to pass logging requests between the logging framework and individual log Handlers.

Inheritance

Constructor

goog.debug.LogRecord(levelmsgloggerNameopt_timeopt_sequenceNumber)

Parameters

level : goog.debug.Logger.Level
One of the level identifiers.
msg : string
The string message.
loggerName : string
The name of the source logger.
opt_time : number=
Time this log record was created if other than now. If 0, we use #goog.now.
opt_sequenceNumber : number=
Sequence number of this log record. This should only be passed in when restoring a log record from persistence.

Instance Methods

Public Protected Private
getException() Object
Get the exception that is part of the log record.
Returns: Object  the exception.
code »
getExceptionText() ?string
Get the exception text that is part of the log record.
Returns: ?string  Exception text.
code »
getLevel() goog.debug.Logger.Level
Get the logging message level, for example Level.SEVERE.
Returns: goog.debug.Logger.Level  the logging message level.
code »
getLoggerName() string
Get the source Logger's name.
Returns: string  source logger name (may be null).
code »
getMessage() string
Get the "raw" log message, before localization or formatting.
Returns: string  the raw message string.
code »
getMillis() number
Get event time in milliseconds since 1970.
Returns: number  event time in millis since 1970.
code »
getSequenceNumber() number
Get the sequence number.

Sequence numbers are normally assigned in the LogRecord constructor, which assigns unique sequence numbers to each new LogRecord in increasing order.

Returns: number  the sequence number.
code »
reset(levelmsgloggerNameopt_timeopt_sequenceNumber)
Sets all fields of the log 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.
opt_time : number=
Time this log record was created if other than now. If 0, we use #goog.now.
opt_sequenceNumber : number=
Sequence number of this log record. This should only be passed in when restoring a log record from persistence.
code »
setException(exception)
Set the exception that is part of the log record.
Arguments:
exception : Object
the exception.
code »
setExceptionText(text)
Set the exception text that is part of the log record.
Arguments:
text : string
The exception text.
code »
setLevel(level)
Set the logging message level, for example Level.SEVERE.
Arguments:
level : goog.debug.Logger.Level
the logging message level.
code »
setLoggerName(loggerName)
Get the source Logger's name.
Arguments:
loggerName : string
source logger name (may be null).
code »
setMessage(msg)
Set the "raw" log message, before localization or formatting.
Arguments:
msg : string
the raw message string.
code »
setMillis(time)
Set event time in milliseconds since 1970.
Arguments:
time : number
event time in millis since 1970.
code »

Instance Properties

exceptionText_ :
Exception text associated with the record
Code »
exception_ :
Exception associated with the record
Code »
Level of the LogRecord
Code »
loggerName_ :
Name of the logger that created the record.
Code »
msg_ :
Message associated with the record
Code »
sequenceNumber_ :
Sequence number for the LogRecord. Each record has a unique sequence number that is greater than all log records created before it.
Code »
time_ :
Time the LogRecord was created.
Code »

Static Properties

goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS :
No description.
Code »
goog.debug.LogRecord.nextSequenceNumber_ :
A sequence counter for assigning increasing sequence numbers to LogRecord objects.
Code »

Package debug

Package Reference