T
- The Serializable
type returned by toSerializable(LogEvent)
TODO There is still a need for a character-based layout for character based event sinks (databases, etc). Would
introduce an EventEncoder, EventRenderer or something similar for the logging event to byte encoding. (RG) A layout
can be configured with a Charset and then Strings can be converted to byte arrays. OTOH, it isn't possible to write
byte arrays as character streams.public interface Layout<T extends Serializable>
byte[]
byte[]
Modifier and Type | Field and Description |
---|---|
static String |
ELEMENT_TYPE
Main plugin element type for Layout plugins.
|
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getContentFormat()
Returns a description of the content format.
|
String |
getContentType()
Returns the content type output by this layout.
|
byte[] |
getFooter()
Returns the format for the layout format.
|
byte[] |
getHeader()
Returns the header for the layout format.
|
byte[] |
toByteArray(LogEvent event)
Formats the event suitable for display.
|
T |
toSerializable(LogEvent event)
Formats the event as an Object that can be serialized.
|
static final String ELEMENT_TYPE
byte[] getFooter()
byte[] getHeader()
byte[] toByteArray(LogEvent event)
event
- The Logging Event.T toSerializable(LogEvent event)
event
- The Logging Event.String getContentType()
Map<String,String> getContentFormat()
Copyright © 1999-2021 Apache Software Foundation. All Rights Reserved.
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.