Class AbstractCsvLayout

All Implemented Interfaces:
LocationAware, Layout<String>, Encoder<LogEvent>, StringLayout
Direct Known Subclasses:
CsvLogEventLayout, CsvParameterLayout

public abstract class AbstractCsvLayout extends AbstractStringLayout
A superclass for Comma-Separated Value (CSV) layouts. Depends on Apache Commons CSV 1.2.
Since:
2.4
  • Field Details

  • Constructor Details

    • AbstractCsvLayout

      protected AbstractCsvLayout(Configuration config, Charset charset, org.apache.commons.csv.CSVFormat csvFormat, String header, String footer)
  • Method Details

    • createFormat

      protected static org.apache.commons.csv.CSVFormat createFormat(String format, Character delimiter, Character escape, Character quote, org.apache.commons.csv.QuoteMode quoteMode, String nullString, String recordSeparator)
    • getContentType

      public String getContentType()
      Description copied from interface: Layout
      Returns the content type output by this layout. The base class returns "text/plain".
      Specified by:
      getContentType in interface Layout<String>
      Overrides:
      getContentType in class AbstractStringLayout
      Returns:
      The default content type for Strings.
    • getFormat

      public org.apache.commons.csv.CSVFormat getFormat()