Module org.elasticsearch.server
Interface ActivityLogProducer<Context extends ActivityLoggerContext>
- Type Parameters:
Context- Specific logger context
- All Known Implementing Classes:
SearchLogProducer
public interface ActivityLogProducer<Context extends ActivityLoggerContext>
Generic log producer class.
Each log producer receives a context and decides whether to log, and at which level. Then it extracts logging information
from the context and places it into the message. The producer defines which fields are included in the specific log message.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault StringSince we only have query logging for now, set it as the default logger name for convenience.produce(Context context, ActionLoggingFields additionalFields) Produces aESLogMessageif the producer decides to log, or nothing otherwise.default ESLogMessageproduceCommon(Context context, String prefix, ActionLoggingFields additionalFields) Produces aESLogMessagewith common fields.
-
Field Details
-
X_OPAQUE_ID_FIELD
- See Also:
-
EVENT_OUTCOME_FIELD
- See Also:
-
EVENT_DURATION_FIELD
- See Also:
-
TRACE_ID_FIELD
- See Also:
-
TASK_ID_FIELD
- See Also:
-
PARENT_TASK_ID_FIELD
- See Also:
-
PARENT_NODE_ID_FIELD
- See Also:
-
-
Method Details
-
produce
Produces aESLogMessageif the producer decides to log, or nothing otherwise. -
loggerName
Since we only have query logging for now, set it as the default logger name for convenience. -
produceCommon
default ESLogMessage produceCommon(Context context, String prefix, ActionLoggingFields additionalFields) Produces aESLogMessagewith common fields.
-