Matthias Andreas Benkard | 2cc18b3 | 2022-09-03 10:03:30 +0200 | [diff] [blame] | 1 | // SPDX-FileCopyrightText: © 2022 Matthias Andreas Benkard <code@mail.matthias.benkard.de> |
| 2 | // |
| 3 | // SPDX-License-Identifier: LGPL-3.0-or-later |
| 4 | |
| 5 | package eu.mulk.quarkus.googlecloud.jsonlogging; |
| 6 | |
| 7 | import org.jboss.logmanager.ExtLogRecord; |
| 8 | |
| 9 | /** |
| 10 | * Contextual data available to {@link StructuredParameterProvider} and {@link LabelProvider}. |
| 11 | * |
| 12 | * <p>Provides access to information carried by the {@link ExtLogRecord} that is being formatted and |
| 13 | * that is not taken care of by {@link Formatter} by default. |
| 14 | */ |
| 15 | public interface ProviderContext { |
| 16 | |
| 17 | /** |
| 18 | * The {@link ExtLogRecord#getLoggerName()} property of the log record that is being formatted. |
| 19 | * |
| 20 | * @return {@link ExtLogRecord#getLoggerName()}. |
| 21 | */ |
| 22 | String loggerName(); |
| 23 | |
| 24 | /** |
| 25 | * The {@link ExtLogRecord#getSequenceNumber()} property of the log record that is being |
| 26 | * formatted. |
| 27 | * |
| 28 | * @return {@link ExtLogRecord#getSequenceNumber()}. |
| 29 | */ |
| 30 | long sequenceNumber(); |
| 31 | |
| 32 | /** |
| 33 | * The {@link ExtLogRecord#getThreadName()} property of the log record that is being formatted. |
| 34 | * |
| 35 | * @return {@link ExtLogRecord#getThreadName()}. |
| 36 | */ |
| 37 | String threadName(); |
| 38 | } |