| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_144) on Sun May 10 12:47:44 MST 2020 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>LogEvent (Apache Log4j Core 2.13.3 API)</title> |
| <meta name="date" content="2020-05-10"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="LogEvent (Apache Log4j Core 2.13.3 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":38,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],32:["t6","Deprecated Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/LogEvent.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/logging/log4j/core/LifeCycle2.html" title="interface in org.apache.logging.log4j.core"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/logging/log4j/core/LogEventListener.html" title="class in org.apache.logging.log4j.core"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/logging/log4j/core/LogEvent.html" target="_top">Frames</a></li> |
| <li><a href="LogEvent.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.logging.log4j.core</div> |
| <h2 title="Interface LogEvent" class="title">Interface LogEvent</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Superinterfaces:</dt> |
| <dd><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></dd> |
| </dl> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><a href="../../../../../org/apache/logging/log4j/core/AbstractLogEvent.html" title="class in org.apache.logging.log4j.core">AbstractLogEvent</a>, <a href="../../../../../org/apache/logging/log4j/core/impl/Log4jLogEvent.html" title="class in org.apache.logging.log4j.core.impl">Log4jLogEvent</a>, <a href="../../../../../org/apache/logging/log4j/core/impl/MutableLogEvent.html" title="class in org.apache.logging.log4j.core.impl">MutableLogEvent</a>, <a href="../../../../../org/apache/logging/log4j/core/async/RingBufferLogEvent.html" title="class in org.apache.logging.log4j.core.async">RingBufferLogEvent</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public interface <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.50">LogEvent</a> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre> |
| <div class="block">Provides contextual information about a logged message. A LogEvent must be <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io"><code>Serializable</code></a> so that it |
| may be transmitted over a network connection, output in a |
| <a href="../../../../../org/apache/logging/log4j/core/layout/SerializedLayout.html" title="class in org.apache.logging.log4j.core.layout"><code>SerializedLayout</code></a>, and many other uses. Besides containing a |
| <code>Message</code>, a LogEvent has a corresponding |
| <code>Level</code> that the message was logged at. If a |
| <code>Marker</code> was used, then it is included here. The contents of the |
| <code>ThreadContext</code> at the time of the log call are provided via |
| <a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getContextMap--"><code>getContextMap()</code></a> and <a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getContextStack--"><code>getContextStack()</code></a>. If a <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang"><code>Throwable</code></a> was included in the log |
| call, then it is provided via <a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getThrown--"><code>getThrown()</code></a>. When this class is serialized, the attached Throwable will |
| be wrapped into a <a href="../../../../../org/apache/logging/log4j/core/impl/ThrowableProxy.html" title="class in org.apache.logging.log4j.core.impl"><code>ThrowableProxy</code></a> so that it may be safely serialized |
| and deserialized properly without causing problems if the exception class is not available on the other end. |
| <p> |
| Since version 2.7, <a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getContextMap--"><code>getContextMap()</code></a> is deprecated in favor of <a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getContextData--"><code>getContextData()</code></a>, which |
| can carry both <code>ThreadContext</code> data as well as other context data supplied by the |
| <a href="../../../../../org/apache/logging/log4j/core/impl/ContextDataInjectorFactory.html" title="class in org.apache.logging.log4j.core.impl">configured</a> |
| <a href="../../../../../org/apache/logging/log4j/core/ContextDataInjector.html" title="interface in org.apache.logging.log4j.core"><code>ContextDataInjector</code></a>. |
| </p></div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>org.apache.logging.log4j.util.ReadOnlyStringMap</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getContextData--">getContextData</a></span>()</code> |
| <div class="block">Returns the <code>ReadOnlyStringMap</code> object holding context data key-value pairs.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getContextMap--">getContextMap</a></span>()</code> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="block"><span class="deprecationComment">use <a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getContextData--"><code>getContextData()</code></a> instead</span></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>org.apache.logging.log4j.ThreadContext.ContextStack</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getContextStack--">getContextStack</a></span>()</code> |
| <div class="block">Gets the context stack (also known as Nested Diagnostic Context or NDC).</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/logging/log4j/core/time/Instant.html" title="interface in org.apache.logging.log4j.core.time">Instant</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getInstant--">getInstant</a></span>()</code> |
| <div class="block">Returns the Instant when the message was logged.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>org.apache.logging.log4j.Level</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getLevel--">getLevel</a></span>()</code> |
| <div class="block">Gets the level.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getLoggerFqcn--">getLoggerFqcn</a></span>()</code> |
| <div class="block">Returns the fully qualified class name of the caller of the logging API.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getLoggerName--">getLoggerName</a></span>()</code> |
| <div class="block">Gets the logger name.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>org.apache.logging.log4j.Marker</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getMarker--">getMarker</a></span>()</code> |
| <div class="block">Gets the Marker associated with the event.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>org.apache.logging.log4j.message.Message</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getMessage--">getMessage</a></span>()</code> |
| <div class="block">Gets the message associated with the event.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getNanoTime--">getNanoTime</a></span>()</code> |
| <div class="block">Returns the value of the running Java Virtual Machine's high-resolution time source when this event was created, |
| or a dummy value if it is known that this value will not be used downstream.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/StackTraceElement.html?is-external=true" title="class or interface in java.lang">StackTraceElement</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getSource--">getSource</a></span>()</code> |
| <div class="block">Gets the source of logging request.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getThreadId--">getThreadId</a></span>()</code> |
| <div class="block">Gets the thread ID.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getThreadName--">getThreadName</a></span>()</code> |
| <div class="block">Gets the thread name.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getThreadPriority--">getThreadPriority</a></span>()</code> |
| <div class="block">Gets the thread priority.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getThrown--">getThrown</a></span>()</code> |
| <div class="block">Gets throwable associated with logging request.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/logging/log4j/core/impl/ThrowableProxy.html" title="class in org.apache.logging.log4j.core.impl">ThrowableProxy</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getThrownProxy--">getThrownProxy</a></span>()</code> |
| <div class="block">Gets throwable proxy associated with logging request.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getTimeMillis--">getTimeMillis</a></span>()</code> |
| <div class="block">Gets event time in milliseconds since midnight, January 1, 1970 UTC.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#isEndOfBatch--">isEndOfBatch</a></span>()</code> |
| <div class="block">Returns <code>true</code> if this event is the last one in a batch, <code>false</code> otherwise.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#isIncludeLocation--">isIncludeLocation</a></span>()</code> |
| <div class="block">Returns whether the source of the logging request is required downstream.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#setEndOfBatch-boolean-">setEndOfBatch</a></span>(boolean endOfBatch)</code> |
| <div class="block">Sets whether this event is the last one in a batch.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#setIncludeLocation-boolean-">setIncludeLocation</a></span>(boolean locationRequired)</code> |
| <div class="block">Sets whether the source of the logging request is required downstream.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html" title="interface in org.apache.logging.log4j.core">LogEvent</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#toImmutable--">toImmutable</a></span>()</code> |
| <div class="block">Returns an immutable version of this log event, which MAY BE a copy of this event.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="toImmutable--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toImmutable</h4> |
| <pre><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html" title="interface in org.apache.logging.log4j.core">LogEvent</a> <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.57">toImmutable</a>()</pre> |
| <div class="block">Returns an immutable version of this log event, which MAY BE a copy of this event.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an immutable version of this log event</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getContextMap--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getContextMap</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.66">getContextMap</a>()</pre> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">use <a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getContextData--"><code>getContextData()</code></a> instead</span></div> |
| <div class="block">Gets the context map (also know as Mapped Diagnostic Context or MDC).</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The context map, never <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getContextData--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getContextData</h4> |
| <pre>org.apache.logging.log4j.util.ReadOnlyStringMap <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.82">getContextData</a>()</pre> |
| <div class="block">Returns the <code>ReadOnlyStringMap</code> object holding context data key-value pairs. |
| <p> |
| Context data (also known as Mapped Diagnostic Context or MDC) is data that is set by the application to be |
| included in all subsequent log events. The default source for context data is the <code>ThreadContext</code> (and |
| <a href="https://logging.apache.org/log4j/2.x/manual/configuration.html#PropertySubstitution">properties</a> |
| configured on the Logger that logged the event), but users can configure a custom <a href="../../../../../org/apache/logging/log4j/core/ContextDataInjector.html" title="interface in org.apache.logging.log4j.core"><code>ContextDataInjector</code></a> |
| to inject key-value pairs from any arbitrary source.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the <code>ReadOnlyStringMap</code> object holding context data key-value pairs</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.7</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../org/apache/logging/log4j/core/ContextDataInjector.html" title="interface in org.apache.logging.log4j.core"><code>ContextDataInjector</code></a>, |
| <code>ThreadContext</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getContextStack--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getContextStack</h4> |
| <pre>org.apache.logging.log4j.ThreadContext.ContextStack <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.89">getContextStack</a>()</pre> |
| <div class="block">Gets the context stack (also known as Nested Diagnostic Context or NDC).</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The context stack, never <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getLoggerFqcn--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLoggerFqcn</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.96">getLoggerFqcn</a>()</pre> |
| <div class="block">Returns the fully qualified class name of the caller of the logging API.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The fully qualified class name of the caller.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getLevel--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLevel</h4> |
| <pre>org.apache.logging.log4j.Level <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.103">getLevel</a>()</pre> |
| <div class="block">Gets the level.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>level.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getLoggerName--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLoggerName</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.110">getLoggerName</a>()</pre> |
| <div class="block">Gets the logger name.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>logger name, may be <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMarker--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMarker</h4> |
| <pre>org.apache.logging.log4j.Marker <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.117">getMarker</a>()</pre> |
| <div class="block">Gets the Marker associated with the event.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Marker or <code>null</code> if no Marker was defined on this LogEvent</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMessage--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMessage</h4> |
| <pre>org.apache.logging.log4j.message.Message <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.124">getMessage</a>()</pre> |
| <div class="block">Gets the message associated with the event.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>message.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getTimeMillis--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTimeMillis</h4> |
| <pre>long <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.133">getTimeMillis</a>()</pre> |
| <div class="block">Gets event time in milliseconds since midnight, January 1, 1970 UTC. |
| Use <a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getInstant--"><code>getInstant()</code></a> to get higher precision timestamp information if available on this platform.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the milliseconds component of this log event's <a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getInstant--">timestamp</a></dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/System.html?is-external=true#currentTimeMillis--" title="class or interface in java.lang"><code>System.currentTimeMillis()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getInstant--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInstant</h4> |
| <pre><a href="../../../../../org/apache/logging/log4j/core/time/Instant.html" title="interface in org.apache.logging.log4j.core.time">Instant</a> <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.146">getInstant</a>()</pre> |
| <div class="block">Returns the Instant when the message was logged. |
| <p> |
| <b>Caution</b>: if this <code>LogEvent</code> implementation is mutable and reused for multiple consecutive log messages, |
| then the <code>Instant</code> object returned by this method is also mutable and reused. |
| Client code should not keep a reference to the returned object but make a copy instead. |
| </p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the <code>Instant</code> holding Instant details for this log event</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.11</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getSource--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSource</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/StackTraceElement.html?is-external=true" title="class or interface in java.lang">StackTraceElement</a> <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.153">getSource</a>()</pre> |
| <div class="block">Gets the source of logging request.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>source of logging request, may be null.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getThreadName--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getThreadName</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.161">getThreadName</a>()</pre> |
| <div class="block">Gets the thread name.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>thread name, may be null. |
| TODO guess this could go into a thread context object too. (RG) Why?</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getThreadId--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getThreadId</h4> |
| <pre>long <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.169">getThreadId</a>()</pre> |
| <div class="block">Gets the thread ID.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>thread ID.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.6</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getThreadPriority--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getThreadPriority</h4> |
| <pre>int <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.177">getThreadPriority</a>()</pre> |
| <div class="block">Gets the thread priority.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>thread priority.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.6</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getThrown--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getThrown</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a> <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.186">getThrown</a>()</pre> |
| <div class="block">Gets throwable associated with logging request. |
| |
| <p>Convenience method for <code>ThrowableProxy.getThrowable();</code></p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>throwable, may be null.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getThrownProxy--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getThrownProxy</h4> |
| <pre><a href="../../../../../org/apache/logging/log4j/core/impl/ThrowableProxy.html" title="class in org.apache.logging.log4j.core.impl">ThrowableProxy</a> <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.193">getThrownProxy</a>()</pre> |
| <div class="block">Gets throwable proxy associated with logging request.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>throwable, may be null.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isEndOfBatch--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isEndOfBatch</h4> |
| <pre>boolean <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.203">isEndOfBatch</a>()</pre> |
| <div class="block">Returns <code>true</code> if this event is the last one in a batch, <code>false</code> otherwise. Used by asynchronous |
| Loggers and Appenders to signal to buffered downstream components when to flush to disk, as a more efficient |
| alternative to the <code>immediateFlush=true</code> configuration.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>whether this event is the last one in a batch.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isIncludeLocation--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isIncludeLocation</h4> |
| <pre>boolean <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.214">isIncludeLocation</a>()</pre> |
| <div class="block">Returns whether the source of the logging request is required downstream. Asynchronous Loggers and Appenders use |
| this flag to determine whether to take a <code>StackTrace</code> snapshot or not before handing off this event to |
| another thread.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the source of the logging request is required downstream, <code>false</code> otherwise.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getSource--"><code>getSource()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setEndOfBatch-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setEndOfBatch</h4> |
| <pre>void <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.223">setEndOfBatch</a>(boolean endOfBatch)</pre> |
| <div class="block">Sets whether this event is the last one in a batch. Used by asynchronous Loggers and Appenders to signal to |
| buffered downstream components when to flush to disk, as a more efficient alternative to the |
| <code>immediateFlush=true</code> configuration.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>endOfBatch</code> - <code>true</code> if this event is the last one in a batch, <code>false</code> otherwise.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setIncludeLocation-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setIncludeLocation</h4> |
| <pre>void <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.234">setIncludeLocation</a>(boolean locationRequired)</pre> |
| <div class="block">Sets whether the source of the logging request is required downstream. Asynchronous Loggers and Appenders use |
| this flag to determine whether to take a <code>StackTrace</code> snapshot or not before handing off this event to |
| another thread.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>locationRequired</code> - <code>true</code> if the source of the logging request is required downstream, <code>false</code> |
| otherwise.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../org/apache/logging/log4j/core/LogEvent.html#getSource--"><code>getSource()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getNanoTime--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getNanoTime</h4> |
| <pre>long <a href="../../../../../src-html/org/apache/logging/log4j/core/LogEvent.html#line.242">getNanoTime</a>()</pre> |
| <div class="block">Returns the value of the running Java Virtual Machine's high-resolution time source when this event was created, |
| or a dummy value if it is known that this value will not be used downstream.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The value of the running Java Virtual Machine's high-resolution time source when this event was created.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>Log4J 2.4</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/LogEvent.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/logging/log4j/core/LifeCycle2.html" title="interface in org.apache.logging.log4j.core"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/logging/log4j/core/LogEventListener.html" title="class in org.apache.logging.log4j.core"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/logging/log4j/core/LogEvent.html" target="_top">Frames</a></li> |
| <li><a href="LogEvent.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small><p align="center">Copyright © 1999-2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.<br /> Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.</p></small></p> |
| </body> |
| </html> |