selenium-webdriver
Version:
The official WebDriver JavaScript bindings from the Selenium project
45 lines • 9.88 kB
HTML
<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"><meta http-equiv="Content-Language" content="en"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>LogRecord</title><link href="dossier.css" rel="stylesheet" type="text/css"><header><div><form><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></header><main><article><div class="parentlink"><b>Namespace:</b> <a href="namespace_webdriver_logging.html">webdriver.logging</a></div><div class="codelink"><a href="source/lib/webdriver/logging.js.src.html#l78">View Source</a></div><h1>class LogRecord</h1><p>LogRecord objects are used to pass logging requests between
the logging framework and individual log Handlers.</p>
<h3>new LogRecord(<wbr>level, msg, loggerName, opt_time, opt_sequenceNumber)</h3><div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>level<code><a href="class_webdriver_logging_Level.html">webdriver.logging.Level</a></code><dd><p>One of the level identifiers.</p>
<dt>msg<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The string message.</p>
<dt>loggerName<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The name of the source logger.</p>
<dt>opt_time<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>=</code><dd><p>Time this log record was created if other than now.
If 0, we use #goog.now.</p>
<dt>opt_sequenceNumber<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>=</code><dd><p>Sequence number of this log record. This
should only be passed in when restoring a log record from persistence.</p>
</dl></div></div><h2>Instance Methods</h2><div id="getException" class="function"><div><h3>getException()<span class="codelink"><a href="source/lib/goog/debug/logrecord.js.src.html#l148">code »</a></span></h3><p>Get the exception that is part of the log record.</p>
<div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd><p>the exception.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="getLevel" class="function"><div><h3>getLevel()<span class="codelink"><a href="source/lib/goog/debug/logrecord.js.src.html#l177">code »</a></span></h3><p>Get the logging message level, for example Level.SEVERE.</p>
<div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_logging_Level.html">webdriver.logging.Level</a></code><dd><p>the logging message level.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="getLoggerName" class="function"><div><h3>getLoggerName()<span class="codelink"><a href="source/lib/goog/debug/logrecord.js.src.html#l138">code »</a></span></h3><p>Get the source Logger's name.</p>
<div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>source logger name (may be null).</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="getMessage" class="function"><div><h3>getMessage()<span class="codelink"><a href="source/lib/goog/debug/logrecord.js.src.html#l196">code »</a></span></h3><p>Get the "raw" log message, before localization or formatting.</p>
<div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>the raw message string.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="getMillis" class="function"><div><h3>getMillis()<span class="codelink"><a href="source/lib/goog/debug/logrecord.js.src.html#l216">code »</a></span></h3><p>Get event time in milliseconds since 1970.</p>
<div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd><p>event time in millis since 1970.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="getSequenceNumber" class="function"><div><h3>getSequenceNumber()<span class="codelink"><a href="source/lib/goog/debug/logrecord.js.src.html#l239">code »</a></span></h3><p>Get the sequence number.</p>
<p>
Sequence numbers are normally assigned in the LogRecord
constructor, which assigns unique sequence numbers to
each new LogRecord in increasing order.
</p><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd><p>the sequence number.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="reset" class="function"><div><h3>reset(<wbr>level, msg, loggerName, opt_time, opt_sequenceNumber)<span class="codelink"><a href="source/lib/goog/debug/logrecord.js.src.html#l118">code »</a></span></h3><p>Sets all fields of the log record.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>level<code><a href="class_webdriver_logging_Level.html">webdriver.logging.Level</a></code><dd><p>One of the level identifiers.</p>
<dt>msg<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The string message.</p>
<dt>loggerName<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The name of the source logger.</p>
<dt>opt_time<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>=</code><dd><p>Time this log record was created if other than now.
If 0, we use #goog.now.</p>
<dt>opt_sequenceNumber<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>=</code><dd><p>Sequence number of this log record. This
should only be passed in when restoring a log record from persistence.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="setException" class="function"><div><h3>setException(<wbr>exception)<span class="codelink"><a href="source/lib/goog/debug/logrecord.js.src.html#l158">code »</a></span></h3><p>Set the exception that is part of the log record.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>exception<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd><p>the exception.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="setLevel" class="function"><div><h3>setLevel(<wbr>level)<span class="codelink"><a href="source/lib/goog/debug/logrecord.js.src.html#l186">code »</a></span></h3><p>Set the logging message level, for example Level.SEVERE.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>level<code><a href="class_webdriver_logging_Level.html">webdriver.logging.Level</a></code><dd><p>the logging message level.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="setLoggerName" class="function"><div><h3>setLoggerName(<wbr>loggerName)<span class="codelink"><a href="source/lib/goog/debug/logrecord.js.src.html#l168">code »</a></span></h3><p>Get the source Logger's name.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>loggerName<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>source logger name (may be null).</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="setMessage" class="function"><div><h3>setMessage(<wbr>msg)<span class="codelink"><a href="source/lib/goog/debug/logrecord.js.src.html#l206">code »</a></span></h3><p>Set the "raw" log message, before localization or formatting.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>msg<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>the raw message string.</p>
</dl></div></div></div></div><hr class="fn-sep"><div id="setMillis" class="function"><div><h3>setMillis(<wbr>time)<span class="codelink"><a href="source/lib/goog/debug/logrecord.js.src.html#l226">code »</a></span></h3><p>Set event time in milliseconds since 1970.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>time<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd><p>event time in millis since 1970.</p>
</dl></div></div></div></div><h2>Compiler Constants</h2><div id="LogRecord.ENABLE_SEQUENCE_NUMBERS" class="property"><dl><dt><a href="source/lib/goog/debug/logrecord.js.src.html#l96">LogRecord.ENABLE_SEQUENCE_NUMBERS</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd><p>Whether to enable log sequence numbers.</p>
</dl></div></article><nav><h3><a href="index.html" tabindex="2">Overview</a></h3><div><input type="checkbox" id="nav-modules" checked/><label for="nav-modules"><h3><span class="selectable" tabindex="2">Modules</span></h3></label><div id="nav-modules-view"></div></div><div><input type="checkbox" id="nav-types" checked/><label for="nav-types"><h3><span class="selectable" tabindex="2">Types</span></h3></label><div id="nav-types-view"></div></div><h3><a href="Changes.html" tabindex="2">Changes</a></h3></nav></main><footer><div><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></div></footer><script src="types.js"></script><script src="dossier.js"></script>