@ComponentProfile(summary="Log unique-id & metadata (values are truncated) only", since="3.8.4") public class TruncateMetadata extends MessageLoggerImpl implements MetadataLogger
MessageLogger
,
MetadataLogger
In the adapter configuration file this class is aliased as message-logging-with-truncated-metadata which is the preferred alternative to the fully qualified classname when building your configuration.
FIELD_MESSAGE_EVENTS, FIELD_METADATA, FIELD_PAYLOAD, FIELD_UNIQUE_ID, LAST_RESORT_LOGGER
Constructor and Description |
---|
TruncateMetadata() |
TruncateMetadata(java.lang.Integer i) |
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getMaxLength() |
void |
setMaxLength(java.lang.Integer bytes)
Set the max length for a metadata value before it gets discarded.
|
java.lang.String |
toString(AdaptrisMessage m) |
java.lang.String |
toString(java.util.Collection<MetadataElement> elements) |
protected MetadataElement |
wrap(java.lang.String key,
java.lang.String value) |
builder, format
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
public TruncateMetadata()
public TruncateMetadata(java.lang.Integer i)
public java.lang.String toString(AdaptrisMessage m)
toString
in interface MessageLogger
public java.lang.Integer getMaxLength()
public void setMaxLength(java.lang.Integer bytes)
bytes
- the length; default is 256 if not specified.public java.lang.String toString(java.util.Collection<MetadataElement> elements)
toString
in interface MetadataLogger
protected MetadataElement wrap(java.lang.String key, java.lang.String value)
wrap
in class MessageLoggerImpl