Class goog.debug.LogRecord

code »

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

Constructor

goog.debug.LogRecord ( level, msg, loggerName, opt_time, opt_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.
Show:

Instance Methods

Get the exception that is part of the log record.

Returns
the exception.

Get the exception text that is part of the log record.

Returns
Exception text.

Get the logging message level, for example Level.SEVERE.

Returns
the logging message level.

Get the source Logger's name.

Returns
source logger name (may be null).

Get the "raw" log message, before localization or formatting.

Returns
the raw message string.

Get event time in milliseconds since 1970.

Returns
event time in millis since 1970.

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
the sequence number.
code »reset ( level, msg, loggerName, opt_time, opt_sequenceNumber )

Sets all fields of the log record.

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.
code »setException ( exception )

Set the exception that is part of the log record.

Parameters
exception: Object
the exception.

Set the exception text that is part of the log record.

Parameters
text: string
The exception text.
code »setLevel ( level )

Set the logging message level, for example Level.SEVERE.

Parameters
level: goog.debug.Logger.Level
the logging message level.
code »setLoggerName ( loggerName )

Get the source Logger's name.

Parameters
loggerName: string
source logger name (may be null).

Set the "raw" log message, before localization or formatting.

Parameters
msg: string
the raw message string.

Set event time in milliseconds since 1970.

Parameters
time: number
event time in millis since 1970.

Instance Properties

Exception text associated with the record

Exception associated with the record

Level of the LogRecord

Name of the logger that created the record.

Message associated with the record

Sequence number for the LogRecord. Each record has a unique sequence number that is greater than all log records created before it.

Time the LogRecord was created.

Static Properties

A sequence counter for assigning increasing sequence numbers to LogRecord objects.

Compiler Constants