summaryrefslogtreecommitdiff
path: root/core/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/ProviderContext.java
blob: 08b399aaccdc18197a662f4e36f64425a1c3f871 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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();
}