Package net.logstash.logback.composite
Class AbstractFormattedTimestampJsonProvider.NumberTimestampWriter
java.lang.Object
net.logstash.logback.composite.AbstractFormattedTimestampJsonProvider.NumberTimestampWriter
- All Implemented Interfaces:
AbstractFormattedTimestampJsonProvider.TimestampWriter
- Enclosing class:
- AbstractFormattedTimestampJsonProvider<Event extends DeferredProcessingAware,
FieldNames extends LogstashCommonFieldNames>
protected static class AbstractFormattedTimestampJsonProvider.NumberTimestampWriter
extends Object
implements AbstractFormattedTimestampJsonProvider.TimestampWriter
Writes the timestamp to the JsonGenerator as a number of milliseconds since unix epoch.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetTimestampAsString
(Instant timestamp) void
writeTo
(JsonGenerator generator, String fieldName, Instant timestamp)
-
Constructor Details
-
NumberTimestampWriter
protected NumberTimestampWriter()
-
-
Method Details
-
writeTo
public void writeTo(JsonGenerator generator, String fieldName, Instant timestamp) throws IOException - Specified by:
writeTo
in interfaceAbstractFormattedTimestampJsonProvider.TimestampWriter
- Throws:
IOException
-
getTimestampAsString
- Specified by:
getTimestampAsString
in interfaceAbstractFormattedTimestampJsonProvider.TimestampWriter
-