Class AbstractCsvLayout
java.lang.Object
org.apache.logging.log4j.core.layout.AbstractLayout<String>
org.apache.logging.log4j.core.layout.AbstractStringLayout
org.apache.logging.log4j.core.layout.AbstractCsvLayout
- All Implemented Interfaces:
- LocationAware,- Layout<String>,- Encoder<LogEvent>,- StringLayout
- Direct Known Subclasses:
- CsvLogEventLayout,- CsvParameterLayout
A superclass for Comma-Separated Value (CSV) layouts.
 Depends on Apache Commons CSV 1.2.
- Since:
- 2.4
- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayoutAbstractStringLayout.Builder<B extends AbstractStringLayout.Builder<B>>, AbstractStringLayout.Serializer, AbstractStringLayout.Serializer2
- 
Field SummaryFieldsFields inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayoutDEFAULT_STRING_BUILDER_SIZE, MAX_STRING_BUILDER_SIZEFields inherited from class org.apache.logging.log4j.core.layout.AbstractLayoutconfiguration, eventCount, footer, header, LOGGERFields inherited from interface org.apache.logging.log4j.core.LayoutELEMENT_TYPE
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAbstractCsvLayout(Configuration config, Charset charset, org.apache.commons.csv.CSVFormat csvFormat, String header, String footer) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected static org.apache.commons.csv.CSVFormatcreateFormat(String format, Character delimiter, Character escape, Character quote, org.apache.commons.csv.QuoteMode quoteMode, String nullString, String recordSeparator) Returns the content type output by this layout.org.apache.commons.csv.CSVFormatMethods inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayoutgetBytes, getCharset, getFooter, getFooterSerializer, getHeader, getHeaderSerializer, getStringBuilder, getStringBuilderEncoder, requiresLocation, serializeToBytes, serializeToString, toByteArray, trimToMaxSizeMethods inherited from class org.apache.logging.log4j.core.layout.AbstractLayoutencode, getConfiguration, getContentFormat, markEventMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.logging.log4j.core.LayoutgetContentFormat, toSerializable
- 
Field Details- 
DEFAULT_CHARSET- See Also:
 
- 
DEFAULT_FORMAT- See Also:
 
 
- 
- 
Constructor Details- 
AbstractCsvLayoutprotected AbstractCsvLayout(Configuration config, Charset charset, org.apache.commons.csv.CSVFormat csvFormat, String header, String footer) 
 
- 
- 
Method Details- 
createFormat
- 
getContentTypeDescription copied from interface:LayoutReturns the content type output by this layout. The base class returns "text/plain".- Specified by:
- getContentTypein interface- Layout<String>
- Overrides:
- getContentTypein class- AbstractStringLayout
- Returns:
- The default content type for Strings.
 
- 
getFormatpublic org.apache.commons.csv.CSVFormat getFormat()
 
-