Class ObjectSerialziationStrategy

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

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

    • ObjectSerialziationStrategy

      public ObjectSerialziationStrategy(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 Object data) throws Exception
      Serialize an event.
      Parameters:
      event - The event.
      eventName - The event name.
      data - The message data Object.
      Returns:
      Serialization of message as a String.
      Throws:
      Exception - Serialization may throw any Exception.