Package com.splunk.logging.serialization
Class PlainTextEventBodySerializer
- java.lang.Object
-
- com.splunk.logging.serialization.PlainTextEventBodySerializer
-
- All Implemented Interfaces:
EventBodySerializer
public class PlainTextEventBodySerializer extends Object implements EventBodySerializer
Custom serializer which sends message in plain-text format and provides message timestamp with millisecond precision.
-
-
Constructor Summary
Constructors Constructor Description PlainTextEventBodySerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getEventTime(HttpEventCollectorEventInfo eventInfo)
Timestamp to be sent with custom message.String
serializeEventBody(HttpEventCollectorEventInfo eventInfo, Object formattedMessage)
-
-
-
Method Detail
-
serializeEventBody
public String serializeEventBody(HttpEventCollectorEventInfo eventInfo, Object formattedMessage)
- Specified by:
serializeEventBody
in interfaceEventBodySerializer
-
getEventTime
public double getEventTime(HttpEventCollectorEventInfo eventInfo)
Description copied from interface:EventBodySerializer
Timestamp to be sent with custom message.- Specified by:
getEventTime
in interfaceEventBodySerializer
- Returns:
- 0 if do not want to send timestamp with message, otherwise number of seconds, between the current time and midnight, January 1, 1970 UTC.
-
-