Class MarkdownLogEvent
java.lang.Object
org.jpos.util.LogEvent
org.jpos.util.MarkdownLogEvent
LogEvent that captures a precomputed Markdown rendering and replays
it verbatim on subsequent dump/toString calls.-
Constructor Summary
ConstructorsConstructorDescriptionMarkdownLogEvent(String frozen) Constructs a MarkdownLogEvent from a precomputed Markdown string.MarkdownLogEvent(LogEvent evt) Constructs a MarkdownLogEvent by capturingevt's rendered form. -
Method Summary
Modifier and TypeMethodDescriptionvoiddump(PrintStream ps, String indent) Dumps the full log event to the given PrintStream.toString()Renders this event to a string with no leading indent.Methods inherited from class LogEvent
add, addMessage, addMessage, dumpHeader, dumpTrailer, getCreatedAt, getDumpedAt, getPayLoad, getRealm, getSource, getTag, getTags, getTraceId, hasException, isHonorSourceLogger, setNoArmor, setSource, setTag, toString, withSource, withTag, withTags, withTraceId, withTraceId, withTraceIdModifier and TypeMethodDescriptionAppends a payload entry and returns this event for chaining.voidaddMessage(Object msg) Adds a message or object to this event's payload.voidaddMessage(String tagname, String message) Adds a message wrapped in an XML tag to this event's payload.protected StringdumpHeader(PrintStream p, String indent) Writes the log event header to the given PrintStream.protected voiddumpTrailer(PrintStream p, String indent) Writes the log event trailer to the given PrintStream.Returns the time at which this event was constructed.Returns the time at which this event was first dumped, capturing it on first call.WARNING: payLoad is a SynchronizedList.getRealm()Returns the realm of the associated source, or empty when no source is set.Returns theLogSourceassociated with this event, if any.getTag()Returns the log tag.getTags()Returns an unmodifiable view of this event's tags.Returns the current trace-id, generating one if absent.booleanIndicates whether the payload contains aThrowable.booleanThis is a hack for backward compatibility after accepting PR67voidsetNoArmor(boolean noArmor) Controls whether the XML wrapper is suppressed in log output.voidReplaces theLogSourceassociated with this event.voidSets the log tag for this event.Renders this event to a string with the given indent prefix.withSource(LogSource source) Sets theLogSourceassociated with this event and returns it for chaining.Adds or overwrites a tag on this event.Adds the supplied tags to this event.Ensures atrace-idtag is present, generating one if needed.withTraceId(String traceId) Sets thetrace-idtag explicitly.withTraceId(UUID uuid) Sets thetrace-idtag from a UUID (dashes stripped).
-
Constructor Details
-
MarkdownLogEvent
Constructs a MarkdownLogEvent from a precomputed Markdown string.- Parameters:
frozen- the Markdown text to render
-
MarkdownLogEvent
Constructs a MarkdownLogEvent by capturingevt's rendered form.- Parameters:
evt- source event whose rendered text is captured
-
-
Method Details
-
dump
-
toString
-