Class TruncateMetadata

  • All Implemented Interfaces:
    MessageLogger, MetadataLogger

    @ComponentProfile(summary="Log unique-id & metadata (values are truncated) only",
                      since="3.8.4")
    public class TruncateMetadata
    extends MessageLoggerImpl
    implements MetadataLogger
    MessageLogger & MetadataLogger implementation that that logs unique-id and metadata but truncates metadata at the configured length.
    See Also:
    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.

    • Constructor Detail

      • TruncateMetadata

        public TruncateMetadata()
      • TruncateMetadata

        public TruncateMetadata​(java.lang.Integer i)
    • Method Detail

      • getMaxLength

        public java.lang.Integer getMaxLength()
      • setMaxLength

        public void setMaxLength​(java.lang.Integer bytes)
        Set the max length for a metadata value before it gets discarded.
        Parameters:
        bytes - the length; default is 256 if not specified.