| <!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 Tue Feb 25 21:03:11 MST 2020 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>AbstractLayout (Apache Log4j Core 2.13.1 API)</title> |
| <meta name="date" content="2020-02-25"> |
| <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="AbstractLayout (Apache Log4j Core 2.13.1 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete 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/AbstractLayout.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/layout/AbstractCsvLayout.html" title="class in org.apache.logging.log4j.core.layout"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.Builder.html" title="class in org.apache.logging.log4j.core.layout"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/logging/log4j/core/layout/AbstractLayout.html" target="_top">Frames</a></li> |
| <li><a href="AbstractLayout.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><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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.layout</div> |
| <h2 title="Class AbstractLayout" class="title">Class AbstractLayout<T 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>></h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.logging.log4j.core.layout.AbstractLayout<T></li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - The Class that the Layout will format the LogEvent into.</dd> |
| </dl> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><a href="../../../../../../org/apache/logging/log4j/core/Layout.html" title="interface in org.apache.logging.log4j.core">Layout</a><T>, <a href="../../../../../../org/apache/logging/log4j/core/layout/Encoder.html" title="interface in org.apache.logging.log4j.core.layout">Encoder</a><<a href="../../../../../../org/apache/logging/log4j/core/LogEvent.html" title="interface in org.apache.logging.log4j.core">LogEvent</a>></dd> |
| </dl> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractStringLayout.html" title="class in org.apache.logging.log4j.core.layout">AbstractStringLayout</a>, <a href="../../../../../../org/apache/logging/log4j/core/layout/MessageLayout.html" title="class in org.apache.logging.log4j.core.layout">MessageLayout</a>, <a href="../../../../../../org/apache/logging/log4j/core/layout/SerializedLayout.html" title="class in org.apache.logging.log4j.core.layout">SerializedLayout</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public abstract class <a href="../../../../../../src-html/org/apache/logging/log4j/core/layout/AbstractLayout.html#line.37">AbstractLayout</a><T 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>> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> |
| implements <a href="../../../../../../org/apache/logging/log4j/core/Layout.html" title="interface in org.apache.logging.log4j.core">Layout</a><T></pre> |
| <div class="block">Abstract base class for Layouts.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Class and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.Builder.html" title="class in org.apache.logging.log4j.core.layout">AbstractLayout.Builder</a><<a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.Builder.html" title="type parameter in AbstractLayout.Builder">B</a> extends <a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.Builder.html" title="class in org.apache.logging.log4j.core.layout">AbstractLayout.Builder</a><<a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.Builder.html" title="type parameter in AbstractLayout.Builder">B</a>>></span></code> |
| <div class="block">Subclasses can extend this abstract Builder.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../../org/apache/logging/log4j/core/config/Configuration.html" title="interface in org.apache.logging.log4j.core.config">Configuration</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.html#configuration">configuration</a></span></code> |
| <div class="block">The current Configuration.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.html#eventCount">eventCount</a></span></code> |
| <div class="block">The number of events successfully processed by this layout.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected byte[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.html#footer">footer</a></span></code> |
| <div class="block">The footer to add when the stream is closed.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected byte[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.html#header">header</a></span></code> |
| <div class="block">The header to include when the stream is opened.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected static org.apache.logging.log4j.Logger</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.html#LOGGER">LOGGER</a></span></code> |
| <div class="block">Allow subclasses access to the status logger without creating another instance.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="fields.inherited.from.class.org.apache.logging.log4j.core.Layout"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from interface org.apache.logging.log4j.core.<a href="../../../../../../org/apache/logging/log4j/core/Layout.html" title="interface in org.apache.logging.log4j.core">Layout</a></h3> |
| <code><a href="../../../../../../org/apache/logging/log4j/core/Layout.html#ELEMENT_TYPE">ELEMENT_TYPE</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.html#AbstractLayout-byte:A-byte:A-">AbstractLayout</a></span>(byte[] header, |
| byte[] footer)</code> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="block"><span class="deprecationComment">Use <a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.html#AbstractLayout-org.apache.logging.log4j.core.config.Configuration-byte:A-byte:A-"><code>AbstractLayout(Configuration, byte[], byte[])</code></a></span></div> |
| </div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.html#AbstractLayout-org.apache.logging.log4j.core.config.Configuration-byte:A-byte:A-">AbstractLayout</a></span>(<a href="../../../../../../org/apache/logging/log4j/core/config/Configuration.html" title="interface in org.apache.logging.log4j.core.config">Configuration</a> configuration, |
| byte[] header, |
| byte[] footer)</code> |
| <div class="block">Constructs a layout with an optional header and footer.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== 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="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete 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>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.html#encode-org.apache.logging.log4j.core.LogEvent-org.apache.logging.log4j.core.layout.ByteBufferDestination-">encode</a></span>(<a href="../../../../../../org/apache/logging/log4j/core/LogEvent.html" title="interface in org.apache.logging.log4j.core">LogEvent</a> event, |
| <a href="../../../../../../org/apache/logging/log4j/core/layout/ByteBufferDestination.html" title="interface in org.apache.logging.log4j.core.layout">ByteBufferDestination</a> destination)</code> |
| <div class="block">Encodes the specified source LogEvent to some binary representation and writes the result to the specified |
| destination.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/logging/log4j/core/config/Configuration.html" title="interface in org.apache.logging.log4j.core.config">Configuration</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.html#getConfiguration--">getConfiguration</a></span>()</code> </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <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/layout/AbstractLayout.html#getContentFormat--">getContentFormat</a></span>()</code> |
| <div class="block">Returns a description of the content format.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>byte[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.html#getFooter--">getFooter</a></span>()</code> |
| <div class="block">Returns the footer, if one is available.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>byte[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.html#getHeader--">getHeader</a></span>()</code> |
| <div class="block">Returns the header, if one is available.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.html#markEvent--">markEvent</a></span>()</code> </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.logging.log4j.core.Layout"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.logging.log4j.core.<a href="../../../../../../org/apache/logging/log4j/core/Layout.html" title="interface in org.apache.logging.log4j.core">Layout</a></h3> |
| <code><a href="../../../../../../org/apache/logging/log4j/core/Layout.html#getContentType--">getContentType</a>, <a href="../../../../../../org/apache/logging/log4j/core/Layout.html#toByteArray-org.apache.logging.log4j.core.LogEvent-">toByteArray</a>, <a href="../../../../../../org/apache/logging/log4j/core/Layout.html#toSerializable-org.apache.logging.log4j.core.LogEvent-">toSerializable</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="LOGGER"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>LOGGER</h4> |
| <pre>protected static final org.apache.logging.log4j.Logger <a href="../../../../../../src-html/org/apache/logging/log4j/core/layout/AbstractLayout.html#line.92">LOGGER</a></pre> |
| <div class="block">Allow subclasses access to the status logger without creating another instance.</div> |
| </li> |
| </ul> |
| <a name="configuration"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>configuration</h4> |
| <pre>protected final <a href="../../../../../../org/apache/logging/log4j/core/config/Configuration.html" title="interface in org.apache.logging.log4j.core.config">Configuration</a> <a href="../../../../../../src-html/org/apache/logging/log4j/core/layout/AbstractLayout.html#line.97">configuration</a></pre> |
| <div class="block">The current Configuration.</div> |
| </li> |
| </ul> |
| <a name="eventCount"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>eventCount</h4> |
| <pre>protected long <a href="../../../../../../src-html/org/apache/logging/log4j/core/layout/AbstractLayout.html#line.102">eventCount</a></pre> |
| <div class="block">The number of events successfully processed by this layout.</div> |
| </li> |
| </ul> |
| <a name="footer"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>footer</h4> |
| <pre>protected final byte[] <a href="../../../../../../src-html/org/apache/logging/log4j/core/layout/AbstractLayout.html#line.107">footer</a></pre> |
| <div class="block">The footer to add when the stream is closed. May be null.</div> |
| </li> |
| </ul> |
| <a name="header"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>header</h4> |
| <pre>protected final byte[] <a href="../../../../../../src-html/org/apache/logging/log4j/core/layout/AbstractLayout.html#line.112">header</a></pre> |
| <div class="block">The header to include when the stream is opened. May be null.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="AbstractLayout-byte:A-byte:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>AbstractLayout</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> |
| public <a href="../../../../../../src-html/org/apache/logging/log4j/core/layout/AbstractLayout.html#line.124">AbstractLayout</a>(byte[] header, |
| byte[] footer)</pre> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.html#AbstractLayout-org.apache.logging.log4j.core.config.Configuration-byte:A-byte:A-"><code>AbstractLayout(Configuration, byte[], byte[])</code></a></span></div> |
| <div class="block">Constructs a layout with an optional header and footer.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>header</code> - The header to include when the stream is opened. May be null.</dd> |
| <dd><code>footer</code> - The footer to add when the stream is closed. May be null.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="AbstractLayout-org.apache.logging.log4j.core.config.Configuration-byte:A-byte:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>AbstractLayout</h4> |
| <pre>public <a href="../../../../../../src-html/org/apache/logging/log4j/core/layout/AbstractLayout.html#line.138">AbstractLayout</a>(<a href="../../../../../../org/apache/logging/log4j/core/config/Configuration.html" title="interface in org.apache.logging.log4j.core.config">Configuration</a> configuration, |
| byte[] header, |
| byte[] footer)</pre> |
| <div class="block">Constructs a layout with an optional header and footer.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>configuration</code> - The configuration</dd> |
| <dd><code>header</code> - The header to include when the stream is opened. May be null.</dd> |
| <dd><code>footer</code> - The footer to add when the stream is closed. May be null.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getConfiguration--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getConfiguration</h4> |
| <pre>public <a href="../../../../../../org/apache/logging/log4j/core/config/Configuration.html" title="interface in org.apache.logging.log4j.core.config">Configuration</a> <a href="../../../../../../src-html/org/apache/logging/log4j/core/layout/AbstractLayout.html#line.145">getConfiguration</a>()</pre> |
| </li> |
| </ul> |
| <a name="getContentFormat--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getContentFormat</h4> |
| <pre>public <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/layout/AbstractLayout.html#line.150">getContentFormat</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../../org/apache/logging/log4j/core/Layout.html#getContentFormat--">Layout</a></code></span></div> |
| <div class="block">Returns a description of the content format.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/logging/log4j/core/Layout.html#getContentFormat--">getContentFormat</a></code> in interface <code><a href="../../../../../../org/apache/logging/log4j/core/Layout.html" title="interface in org.apache.logging.log4j.core">Layout</a><<a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.html" title="type parameter in AbstractLayout">T</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>></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a Map of key/value pairs describing the Layout-specific content format, or an empty Map if no content |
| format descriptors are specified.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getFooter--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFooter</h4> |
| <pre>public byte[] <a href="../../../../../../src-html/org/apache/logging/log4j/core/layout/AbstractLayout.html#line.160">getFooter</a>()</pre> |
| <div class="block">Returns the footer, if one is available.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/logging/log4j/core/Layout.html#getFooter--">getFooter</a></code> in interface <code><a href="../../../../../../org/apache/logging/log4j/core/Layout.html" title="interface in org.apache.logging.log4j.core">Layout</a><<a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.html" title="type parameter in AbstractLayout">T</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>></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A byte array containing the footer.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getHeader--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getHeader</h4> |
| <pre>public byte[] <a href="../../../../../../src-html/org/apache/logging/log4j/core/layout/AbstractLayout.html#line.170">getHeader</a>()</pre> |
| <div class="block">Returns the header, if one is available.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/logging/log4j/core/Layout.html#getHeader--">getHeader</a></code> in interface <code><a href="../../../../../../org/apache/logging/log4j/core/Layout.html" title="interface in org.apache.logging.log4j.core">Layout</a><<a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.html" title="type parameter in AbstractLayout">T</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>></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A byte array containing the header.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="markEvent--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>markEvent</h4> |
| <pre>protected void <a href="../../../../../../src-html/org/apache/logging/log4j/core/layout/AbstractLayout.html#line.174">markEvent</a>()</pre> |
| </li> |
| </ul> |
| <a name="encode-org.apache.logging.log4j.core.LogEvent-org.apache.logging.log4j.core.layout.ByteBufferDestination-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>encode</h4> |
| <pre>public void <a href="../../../../../../src-html/org/apache/logging/log4j/core/layout/AbstractLayout.html#line.209">encode</a>(<a href="../../../../../../org/apache/logging/log4j/core/LogEvent.html" title="interface in org.apache.logging.log4j.core">LogEvent</a> event, |
| <a href="../../../../../../org/apache/logging/log4j/core/layout/ByteBufferDestination.html" title="interface in org.apache.logging.log4j.core.layout">ByteBufferDestination</a> destination)</pre> |
| <div class="block">Encodes the specified source LogEvent to some binary representation and writes the result to the specified |
| destination. |
| <p> |
| The default implementation of this method delegates to the <a href="../../../../../../org/apache/logging/log4j/core/Layout.html#toByteArray-org.apache.logging.log4j.core.LogEvent-"><code>Layout.toByteArray(LogEvent)</code></a> method which allocates |
| temporary objects. |
| </p><p> |
| Subclasses can override this method to provide a garbage-free implementation. For text-based layouts, |
| <code>AbstractStringLayout</code> provides various convenience methods to help with this: |
| </p> |
| <pre>@Plugin(name = "MyLayout", category = Node.CATEGORY, elementType = Layout.ELEMENT_TYPE, printObject = true) |
| public final class MyLayout extends AbstractStringLayout {</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/logging/log4j/core/layout/Encoder.html#encode-T-org.apache.logging.log4j.core.layout.ByteBufferDestination-">encode</a></code> in interface <code><a href="../../../../../../org/apache/logging/log4j/core/layout/Encoder.html" title="interface in org.apache.logging.log4j.core.layout">Encoder</a><<a href="../../../../../../org/apache/logging/log4j/core/LogEvent.html" title="interface in org.apache.logging.log4j.core">LogEvent</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>event</code> - the LogEvent to encode.</dd> |
| <dd><code>destination</code> - holds the ByteBuffer to write into.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractStringLayout.html#getStringBuilder--"><code>AbstractStringLayout.getStringBuilder()</code></a>, |
| <a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractStringLayout.html#getStringBuilderEncoder--"><code>AbstractStringLayout.getStringBuilderEncoder()</code></a></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/AbstractLayout.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/layout/AbstractCsvLayout.html" title="class in org.apache.logging.log4j.core.layout"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/logging/log4j/core/layout/AbstractLayout.Builder.html" title="class in org.apache.logging.log4j.core.layout"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/logging/log4j/core/layout/AbstractLayout.html" target="_top">Frames</a></li> |
| <li><a href="AbstractLayout.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><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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> |