class LogRecord

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

new LogRecord(level, msg, loggerName, opt_time, opt_sequenceNumber)

Parameters
levelwebdriver.logging.Level

One of the level identifiers.

msgstring

The string message.

loggerNamestring

The name of the source logger.

opt_timenumber=

Time this log record was created if other than now. If 0, we use #goog.now.

opt_sequenceNumbernumber=

Sequence number of this log record. This should only be passed in when restoring a log record from persistence.

Instance Methods

getException()code »

Get the exception that is part of the log record.

Returns
Object

the exception.


getLevel()code »

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

Returns
webdriver.logging.Level

the logging message level.


getLoggerName()code »

Get the source Logger's name.

Returns
string

source logger name (may be null).


getMessage()code »

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

Returns
string

the raw message string.


getMillis()code »

Get event time in milliseconds since 1970.

Returns
number

event time in millis since 1970.


getSequenceNumber()code »

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.


reset(level, msg, loggerName, opt_time, opt_sequenceNumber)code »

Sets all fields of the log record.

Parameters
levelwebdriver.logging.Level

One of the level identifiers.

msgstring

The string message.

loggerNamestring

The name of the source logger.

opt_timenumber=

Time this log record was created if other than now. If 0, we use #goog.now.

opt_sequenceNumbernumber=

Sequence number of this log record. This should only be passed in when restoring a log record from persistence.


setException(exception)code »

Set the exception that is part of the log record.

Parameters
exceptionObject

the exception.


setLevel(level)code »

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

Parameters
levelwebdriver.logging.Level

the logging message level.


setLoggerName(loggerName)code »

Get the source Logger's name.

Parameters
loggerNamestring

source logger name (may be null).


setMessage(msg)code »

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

Parameters
msgstring

the raw message string.


setMillis(time)code »

Set event time in milliseconds since 1970.

Parameters
timenumber

event time in millis since 1970.

Compiler Constants

LogRecord.ENABLE_SEQUENCE_NUMBERSboolean

Whether to enable log sequence numbers.