diff options
Diffstat (limited to 'core/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/ProviderContext.java')
-rw-r--r-- | core/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/ProviderContext.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/core/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/ProviderContext.java b/core/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/ProviderContext.java new file mode 100644 index 0000000..08b399a --- /dev/null +++ b/core/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/ProviderContext.java @@ -0,0 +1,38 @@ +// SPDX-FileCopyrightText: © 2022 Matthias Andreas Benkard <code@mail.matthias.benkard.de> +// +// SPDX-License-Identifier: LGPL-3.0-or-later + +package eu.mulk.quarkus.googlecloud.jsonlogging; + +import org.jboss.logmanager.ExtLogRecord; + +/** + * Contextual data available to {@link StructuredParameterProvider} and {@link LabelProvider}. + * + * <p>Provides access to information carried by the {@link ExtLogRecord} that is being formatted and + * that is not taken care of by {@link Formatter} by default. + */ +public interface ProviderContext { + + /** + * The {@link ExtLogRecord#getLoggerName()} property of the log record that is being formatted. + * + * @return {@link ExtLogRecord#getLoggerName()}. + */ + String loggerName(); + + /** + * The {@link ExtLogRecord#getSequenceNumber()} property of the log record that is being + * formatted. + * + * @return {@link ExtLogRecord#getSequenceNumber()}. + */ + long sequenceNumber(); + + /** + * The {@link ExtLogRecord#getThreadName()} property of the log record that is being formatted. + * + * @return {@link ExtLogRecord#getThreadName()}. + */ + String threadName(); +} |