Package io.spine.logging.flogger.backend
Class TemplateContext
- java.lang.Object
-
- io.spine.logging.flogger.backend.TemplateContext
-
public final class TemplateContext extends Object
A context object for templates that allows caches to validate existing templates or create new ones. If two template contexts are equal (viaequals(java.lang.Object)) then the templates they produce are interchangeable.Template contexts are created by the frontend and passed through to backend implementations via the
LogDatainterface.- See Also:
- Original Java code of Google Flogger
-
-
Constructor Summary
Constructors Constructor Description TemplateContext(MessageParser parser, String message)Creates a template context for a log statement.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetMessage()Returns the message for the log statement.MessageParsergetParser()Returns the message parser for the log statement.inthashCode()
-
-
-
Constructor Detail
-
TemplateContext
public TemplateContext(MessageParser parser, String message)
Creates a template context for a log statement.
-
-
Method Detail
-
getParser
public MessageParser getParser()
Returns the message parser for the log statement.
-
getMessage
public String getMessage()
Returns the message for the log statement.
-
-