Class MapSerialziationStrategy

java.lang.Object
com.arpnetworking.logback.serialization.steno.MapSerialziationStrategy
All Implemented Interfaces:
Serializable

public class MapSerialziationStrategy extends Object implements Serializable
Serialization strategy for map based message specifications.
Since:
1.3.1
Author:
Ville Koskela (ville dot koskela at inscopemetrics dot io)
See Also:
  • Constructor Details

    • MapSerialziationStrategy

      public MapSerialziationStrategy(StenoEncoder encoder, com.fasterxml.jackson.core.JsonFactory jsonFactory, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      Public constructor.
      Parameters:
      encoder - Instance of StenoEncoder.
      jsonFactory - Instance of JsonFactory.
      objectMapper - Instance of ObjectMapper.
  • Method Details

    • serialize

      public String serialize(ch.qos.logback.classic.spi.ILoggingEvent event, String eventName, @Nullable Map<String,? extends Object> map) throws Exception
      Serialize an event.
      Parameters:
      event - The event.
      eventName - The event name.
      map - The message key to value pairs.
      Returns:
      Serialization of message as a String.
      Throws:
      Exception - Serialization may throw any Exception.