Package ch.qos.logback.core.pattern

# Class PatternLayoutEncoderBase<E>

java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.encoder.EncoderBase<E>
ch.qos.logback.core.encoder.LayoutWrappingEncoder<E>
ch.qos.logback.core.pattern.PatternLayoutEncoderBase<E>

All Implemented Interfaces:
  `Encoder<E>`, `ContextAware`, `LifeCycle`

Direct Known Subclasses:
  `PatternLayoutEncoder`, `PatternLayoutEncoder`

public class PatternLayoutEncoderBase<E> extends LayoutWrappingEncoder<E>

## Field Summary

Fields
Modifier and Type
Field
Description
`protected boolean`
`outputPatternAsHeader`

### Fields inherited from class ch.qos.logback.core.encoder.LayoutWrappingEncoder

`layout`

### Fields inherited from class ch.qos.logback.core.encoder.EncoderBase

`started`

### Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

`context`

## Constructor Summary

Constructors
Constructor
Description
`PatternLayoutEncoderBase()`

## Method Summary

Modifier and Type
Method
Description
`String`
`getPattern()`
`boolean`
`isOutputPatternAsHeader()`
`boolean`
`isOutputPatternAsPresentationHeader()`
`void`
`setLayout(Layout<E> layout)`
`void`
`setOutputPatternAsHeader(boolean outputPatternAsHeader)`
Print the pattern string as a header in log files
`void`
`setOutputPatternAsPresentationHeader(boolean outputPatternAsHeader)`
Deprecated.
replaced by `setOutputPatternAsHeader(boolean)`
`void`
`setPattern(String pattern)`

### Methods inherited from class ch.qos.logback.core.encoder.LayoutWrappingEncoder

`encode, footerBytes, getCharset, getLayout, headerBytes, isStarted, setCharset, setImmediateFlush, setParent, start, stop`

### Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase

`addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface ch.qos.logback.core.spi.ContextAware

`addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext`

## Field Details

### outputPatternAsHeader

protected boolean outputPatternAsHeader

## Constructor Details

### PatternLayoutEncoderBase

public PatternLayoutEncoderBase()

## Method Details

### getPattern

public String getPattern()

### setPattern

public void setPattern(String pattern)

### isOutputPatternAsHeader

public boolean isOutputPatternAsHeader()

### setOutputPatternAsHeader

public void setOutputPatternAsHeader(boolean outputPatternAsHeader)
Print the pattern string as a header in log files

Parameters:
  `outputPatternAsHeader` -
Since:
  1.0.3

### isOutputPatternAsPresentationHeader

public boolean isOutputPatternAsPresentationHeader()

### setOutputPatternAsPresentationHeader

public void setOutputPatternAsPresentationHeader(boolean outputPatternAsHeader)
Deprecated.
replaced by `setOutputPatternAsHeader(boolean)`

### setLayout

public void setLayout(Layout<E> layout)

Overrides:
  `setLayout` in class `LayoutWrappingEncoder<E>`