Package org.apache.solr.util
Class SolrLogLayout
- java.lang.Object
-
- org.apache.logging.log4j.core.layout.AbstractLayout<String>
-
- org.apache.logging.log4j.core.layout.AbstractStringLayout
-
- org.apache.solr.util.SolrLogLayout
-
- All Implemented Interfaces:
org.apache.logging.log4j.core.Layout<String>
,org.apache.logging.log4j.core.layout.Encoder<org.apache.logging.log4j.core.LogEvent>
,org.apache.logging.log4j.core.StringLayout
@Plugin(name="SolrLogLayout", category="Core", elementType="layout", printObject=true) public class SolrLogLayout extends org.apache.logging.log4j.core.layout.AbstractStringLayout
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SolrLogLayout.CoreInfo
static class
SolrLogLayout.Method
static interface
SolrLogLayout.TG
Add this interface to a thread group and the string returned by getTag() will appear in log statements of any threads under that group.-
Nested classes/interfaces inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayout
org.apache.logging.log4j.core.layout.AbstractStringLayout.Builder<B extends org.apache.logging.log4j.core.layout.AbstractStringLayout.Builder<B>>, org.apache.logging.log4j.core.layout.AbstractStringLayout.Serializer, org.apache.logging.log4j.core.layout.AbstractStringLayout.Serializer2
-
-
Field Summary
Fields Modifier and Type Field Description boolean
shorterFormat
-
Fields inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayout
DEFAULT_STRING_BUILDER_SIZE, MAX_STRING_BUILDER_SIZE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SolrLogLayout(Charset charset)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
_format(org.apache.logging.log4j.core.LogEvent event)
void
appendThread(StringBuilder sb)
static SolrLogLayout
createLayout(Charset charset)
void
setShorterFormat()
String
toSerializable(org.apache.logging.log4j.core.LogEvent event)
-
Methods inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayout
getBytes, getCharset, getContentType, getFooter, getFooterSerializer, getHeader, getHeaderSerializer, getStringBuilder, getStringBuilderEncoder, serializeToBytes, serializeToString, toByteArray, trimToMaxSize
-
Methods inherited from class org.apache.logging.log4j.core.layout.AbstractLayout
encode, getConfiguration, getContentFormat, markEvent
-
-
-
-
Constructor Detail
-
SolrLogLayout
protected SolrLogLayout(Charset charset)
-
-
Method Detail
-
createLayout
@PluginFactory public static SolrLogLayout createLayout(@PluginAttribute(value="charset",defaultString="UTF-8") Charset charset)
-
appendThread
public void appendThread(StringBuilder sb)
-
toSerializable
public String toSerializable(org.apache.logging.log4j.core.LogEvent event)
-
_format
public String _format(org.apache.logging.log4j.core.LogEvent event)
-
setShorterFormat
public void setShorterFormat()
-
-