LogData

public interface LogData

A backend API for determining metadata associated with a log statement.

Some metadata is expected to be available for all log statements (such as the log level or a timestamp) whereas other data is optional (class/method name for example). As well providing the common logging metadata, customized loggers can choose to add arbitrary key/value pairs to the log data. It is up to each logging backend implementation to decide how it interprets this data using the hierarchical key. See Metadata.

See also

<a href="https://github.com/google/flogger/blob/cb9e836a897d36a78309ee8badf5cad4e6a2d3d8/api/src/main/java/com/google/common/flogger/backend/LogData.java">

Original Java code of Google Flogger

Inheritors

Functions

Link copied to clipboard
public abstract Array<Object> getArguments()
Returns the arguments to be formatted with the message.
Link copied to clipboard
public abstract Level getLevel()
Returns the log level for the current log statement.
Link copied to clipboard
public abstract Object getLiteralArgument()
Returns the single argument to be logged directly when no arguments were provided.
Link copied to clipboard
public abstract String getLoggerName()
Returns the logger name (which is usually a canonicalized class name) or null if not given.
Link copied to clipboard
public abstract FloggerLogSite getLogSite()
Returns the log site data for the current log statement.
Link copied to clipboard
public abstract Metadata getMetadata()
Returns any additional metadata for this log statement.
Link copied to clipboard
Returns a template key for this log statement, or null if the statement does not require formatting (in which case the message to be logged can be determined by calling getLiteralArgument).
Link copied to clipboard
public abstract long getTimestampMicros()
Link copied to clipboard
public abstract long getTimestampNanos()
Returns a nanosecond timestamp for the current log statement.
Link copied to clipboard
public abstract boolean wasForced()
Returns whether this log statement should be emitted regardless of its log level or any other properties.