Logging configuration

Quarkus でのロギング API の使用、ロギング出力の設定、他のロギング API からの出力を統一するためのロギングアダプターの使用について解説します。

このドキュメントは、 QuarkusのObservabilityリファレンスガイド の一部です。

Quarkus は、アプリケーションとフレームワークのログを発行するために JBoss Log Manager ロギングバックエンドを使用します。 Quarkus は JBoss Logging API と他の複数のロギング API をサポートしており、これらは JBoss Log Manager とシームレスに統合されています。

This means you can use your favorite logging API with Quarkus, provided you add the appropriate adapter to your application:

ロギング API アダプター

JBoss Logging

組み込み

JDK java.util.logging (JUL)

組み込み

SLF4J

SLF4J アダプター

Apache Commons Logging

Commons Logging アダプター

Apache Log4j 2

Log4j 2 アダプター

Apache Log4j 1

Log4j 1 アダプター

アプリケーションのロギングに JBoss Logging を使用

JBoss Logging API を使用する場合、 Quarkus が自動的に提供するため、アプリケーションに追加の依存関係は必要ありません。

An example of using the JBoss Logging API to log a message:
import org.jboss.logging.Logger;

import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;

@Path("/hello")
public class ExampleResource {

    private static final Logger LOG = Logger.getLogger(ExampleResource.class);

    @GET
    @Produces(MediaType.TEXT_PLAIN)
    public String hello() {
        LOG.info("Hello");
        return "hello";
    }
}
While JBoss Logging routes log messages directly to the JBoss Log Manager, one of your libraries might rely on a different logging API. In such cases, you need to use a logging adapter to ensure that its log messages are routed to JBoss Log Manager as well.

アプリケーションロガーの取得

Quarkus でアプリケーションロガーを取得するには、次のいずれかのアプローチを選択します。

ロガー・フィールドの宣言

この古典的なアプローチでは、特定のAPIを使用してロガーインスタンスを取得し、それをクラスの静的フィールドに格納し、このインスタンスに対してロギング操作を呼び出します。

supported logging APIs であれば、同じフローを適用できます。

An example of storing a logger instance into a static field by using the JBoss Logging API:
package com.example;

import org.jboss.logging.Logger;

public class MyService {
    private static final Logger log = Logger.getLogger(MyService.class); (1)

    public void doSomething() {
        log.info("It works!"); (2)
    }
}
1 ロガーフィールドを定義します。
2 log オブジェクトに対して、必要なロギングメソッドを呼び出します。

Logger インスタンスを作成すると、Quarkus はアプリケーションの全ライフサイクルにわたって、その Logger 名に関連付けられたメタデータをメモリー内に保持します。

ロガーに対して、 for (int i …​) { Logger.getLogger("logger-name." + i).info("my log") } のような、制限のない動的な名前を使用しないでください。

簡易ロギング

Quarkus は、 io.quarkus.logging.Log を使用するクラスにロガーフィールドを自動的に追加することで、ロギングを簡素化します。これにより、反復的なボイラープレートコードが不要になり、ロギング設定の利便性が向上します。

An example of simplified logging with static method calls:
package com.example;

import io.quarkus.logging.Log; (1)

class MyService { (2)
    public void doSomething() {
        Log.info("Simple!"); (3)
    }
}
1 io.quarkus.logging.Log クラスは JBoss Logging と同じメソッドを提供しますが、これらは静的メソッドです。
2 このクラスはロガーフィールドを宣言しません。アプリケーションのビルド中に、Quarkus は Log API を使用する各クラスに private static final org.jboss.logging.Logger フィールドを作成します。Quarkus は、呼び出し元のクラスの完全修飾名をロガー名として使用します。この例では、ロガー名は com.example.MyService です。
3 アプリケーションのビルド中に、Quarkus は Log メソッドへの呼び出しを、生成されたロガーフィールド上の JBoss Logging 呼び出しに書き換えます。

Log API は外部依存関係ではなく、アプリケーションクラスでのみ使用してください。 ビルド時に Quarkus によって処理されない Log メソッド呼び出しは例外になります。

Using io.quarkus.logging.Log in extensions:

While the Log API simplifies logging in application classes, do not use it in extension modules or external dependencies.

以下の考慮事項が適用されます。

  • io.quarkus.logging.Log は、ビルド時に発生する Quarkus バイトコード変換に依存します。

  • 拡張モジュールでは、モジュールに Jandex インデックスが含まれている場合にのみ Log が機能します。 ただし、この動作はサポートされておらず、ロギングの信頼性が低くなる可能性があります。

    エクステンションの開発では、 io.quarkus.logging.Log の代わりに org.jboss.logging.Logger.getLogger (String) を使用します。

設定されたロガーの注入

ロガーフィールドを宣言する代わりに、別の方法として @Inject を使用して設定済みの org.jboss.logging.Logger インスタンスを注入できます。この方法は CDI Bean にのみ適用されます。

ロガー名を制御するには、以下の注入パターンのいずれかを選択してください。

  • ロガー名を注入先のクラス名にしたい場合は、 @Inject Logger log を使用します。

  • ロガー名を明示的に設定したい場合は、 @LoggerName("…​") Logger log を使用します。

すでに Logger@LoggerName("…​") を付与している場合、 @Inject は必須ではありません。

注入された後は、 log オブジェクトを使用してロギングメソッドを呼び出すことができます。

An example of two different types of logger injection:
package com.example;

import org.jboss.logging.Logger;

@ApplicationScoped
class SimpleBean {

   @Inject
   Logger log; (1)

   @LoggerName("foo")
   Logger fooLog; (2)

   public void ping() {
     log.info("Simple!");
     fooLog.info("Goes to _foo_ logger!");
   }
}
1 ロガーは org.jboss.logging.Logger.getLogger(SimpleBean.class) で作成されます。
2 この場合、 "foo" という名前がロガー名として使用されます。ロガーは org.jboss.logging.Logger.getLogger("foo") で作成されます。

Quarkus は内部的にロガーインスタンスをキャッシュします。 @RequestScoped Bean にロガーを注入する場合、ロガーの繰り返し生成によるパフォーマンス低下を避けるため、Quarkus は Bean インスタンス間でそのロガーを共有します。

ログレベルの使用

Quarkus は、イベントの重要性に基づいてログに記録される情報の量を制御するために、複数のログレベルを提供します。

利用可能なログレベル:
OFF

ロギングをオフにするために設定で使用される特別なレベル。

FATAL

重大なサービス障害またはリクエストをまったく処理できない状態。

ERROR

処理中の重大な問題またはリクエストを完了できない状態。

WARN

重大ではないサービスエラーまたは即時の修正を必要としない可能性がある問題。

INFO

サービスライフサイクルイベントまたはその他の重要で頻度の低い情報。

DEBUG

ライフサイクルイベントまたは特定のリクエストに関連付けられていないイベントに関する追加情報。デバッグに役立ちます。

TRACE

リクエストごとの詳細なデバッグ情報。非常に高頻度で提供される可能性があります。

ALL

カスタムレベルを含むすべてのメッセージのロギングをオンにする特別なレベル。

java.util.logging を使用するアプリケーションやライブラリに対して、以下のレベルを設定することもできます。 :

SEVERE

ERROR と同じ

WARNING

WARN と同じ

CONFIG

サービス構成情報

FINE

DEBUG と同じ

FINER

TRACE と同じ

FINEST

TRACE と比較して、更に度合いの強いデバッグ出力。高頻度の場合があります。

Table 1. レベル間のマッピング
レベルの数値 標準レベル名 相当する java.util.logging (JUL) レベル名

1100

FATAL

該当なし

1000

ERROR

SEVERE

900

WARN

WARNING

800

INFO

INFO

700

該当なし

CONFIG

500

DEBUG

FINE

400

TRACE

FINER

300

該当なし

FINEST

ログレベル、カテゴリー、フォーマットの設定

Quarkus に統合された JBoss Logging は、利用可能なすべてのエクステンションを設定する単一の設定ファイルを通じて、すべての サポートされているロギング API に対して統一された設定を提供します。

ランタイムロギングを調整するには、 application.properties ファイルを編集します。

An example of how you can set the default log level to INFO logging and include Hibernate DEBUG logs:
quarkus.log.level=INFO
quarkus.log.category."org.hibernate".level=DEBUG

Quarkus YAML エクステンション が含まれていると仮定すると、同等の YAML 設定は以下のようになります。

quarkus:
  log:
    level: INFO
    category:
      org.hibernate: # Using org.hibernate as a single key is required
        level: DEBUG

ログレベルを DEBUG 未満 (例えば TRACE) に設定する場合は、最小ログレベルも調整する必要があります。

quarkus.log.min-level 設定プロパティーを使用して最小ログレベルをグローバルに設定するか、カテゴリーごとに設定します。

quarkus.log.category."org.hibernate".min-level=TRACE

最小ログレベルは、Quarkus がサポートコードを生成する基準となるフロアレベルを設定するビルド時設定オプションです。これにより、ネイティブイメージのビルド時のデッドコード削除など、さらなるビルド時の最適化が可能になります。

ネイティブ実行可能ファイルの例。

最小ログレベルとして INFO を設定すると、 isTraceEnabled() などのより低いレベルのチェックが常に false を返すよう強制されます。

その結果、 if (logger.isDebugEnabled()) callMethod(); のようなコードは決して実行されないと識別され、デッドコードとして扱われます。

If you add these properties on the command line, ensure the " character is escaped with a backslash:

-Dquarkus.log.category.\"org.hibernate\".level=TRACE

考えられるプロパティーはすべて、logging configuration reference セクションにリストします。

ロギングカテゴリ

ロギングはカテゴリーごとに設定されます。あるカテゴリーの設定は、より具体的なサブカテゴリーの設定が存在しない限り、すべてのサブカテゴリーに再帰的に適用されます。

すべてのロギングカテゴリの親は、"ルートカテゴリ "と呼ばれます。最終的な親として、このカテゴリは他のすべてのカテゴリにグローバルに適用される設定を含むことができます。 これには、グローバルに設定されたハンドラとフォーマッタが含まれます。

Example 1. すべてのカテゴリーに適用されるグローバル設定の例:
quarkus.log.handlers=con,mylog

quarkus.log.handler.console.con.enable=true
quarkus.log.handler.file.mylog.enable=true

この例では、ルートカテゴリーは、 conmylog という 2 つの名前付きハンドラーを使用するように設定されています。

Example 2. カテゴリーごとの設定例:
quarkus.log.category."org.apache.kafka.clients".level=INFO
quarkus.log.category."org.apache.kafka.common.utils".level=INFO

この例は、 org.apache.kafka.clients および org.apache.kafka.common.utils カテゴリーの最小ログレベルを設定する方法を示しています。

詳細は、ロギング設定リファレンス を参照してください。

特定のカテゴリーに対して特別な設定をする場合は、 quarkus.log.handler.[console|file|syslog].<your-handler-name>.* のような名前付きハンドラーを作成し、 quarkus.log.category.<my-category>.handlers を使ってそのカテゴリー用に設定します。

An example use case can be a desire to use a different timestamp format for log messages that are saved to a file than the format used for other handlers.

さらに詳しい説明については、Attaching named handlers to a category 例の出力を参照してください。

プロパティ名 デフォルト 説明

quarkus.log.category."<category-name>".level

INFO footnote:[一部のエクステンションでは、デフォルトでログノイズを減らすために、特定のカテゴリーに対してカスタマイズされたデフォルトのログレベルが定義される場合があります。 設定でログレベルを設定すると、エクステンションで定義されたログレベルが上書きされます。

<category-name> という名前のカテゴリを設定するために使用するレベル。クオートが必要です。

quarkus.log.category."<category-name>".min-level

DEBUG

<category-name> という名前のカテゴリを設定するために使用する最小ロギングレベル。クオートが必要です。

quarkus.log.category."<category-name>".use-parent-handlers

true

このロガーがその出力を親ロガーに送信するかどうかを指定します。

quarkus.log.category."<category-name>".handlers=[<handler>]

empty [1]

特定のカテゴリにアタッチしたいハンドラーの名前です。

. 記号は、設定プロパティ内の特定の部分を区切ります。 プロパティ名の引用符は、 quarkus.log.category."io.quarkus.smallrye.jwt".level=TRACE のようなカテゴリ指定をそのまま維持するための必須エスケープとして使用されます。

ルートロガーの設定

ルート・ロガー・カテゴリーは別個に扱われ、以下のプロパティを使用して設定されます:

プロパティ名 デフォルト 説明

quarkus.log.level

INFO

各ログカテゴリのデフォルトのログレベル。

quarkus.log.min-level

DEBUG

各ログカテゴリのデフォルトの最小ログレベル。

  • 指定されたロガー カテゴリにレベル設定が存在しない場合、親カテゴリが調べられます。

  • カテゴリおよびその親カテゴリのいずれにも特定の設定が提供されていない場合、 ルート・ロガー設定が使用されます。

ルートロガーのハンドラは、通常、 quarkus.log.consolequarkus.log.file および quarkus.log.syslog によって直接設定されますが、 quarkus.log.handlers プロパティを使用して、追加の名前付きハンドラを添付することができます。

ロギングフォーマット

人間が読めるテキスト

Quarkus は、人間が判読できるテキストログを生成するパターンベースのロギングフォーマッターをデフォルトで使用します。ただし、専用のプロパティーを使用して各ログハンドラーのフォーマットを設定することもできます。

コンソールハンドラの場合、プロパティは quarkus.log.console.format です。

ログフォーマット文字列は、以下のシンボルをサポートしています:

Symbol 概要 説明

%%

%

単に % 文字をレンダリングします。

%c

カテゴリ

カテゴリ名をレンダリングします。

%C

ソースクラス

ソースクラス名をレンダリングします。[2]

%d{xxx}

日付

java.text.SimpleDateFormat で定義されている構文を使用した、指定した日付書式の文字列で日付をレンダリングします。

%e

Exception

投げられた例外があれば、その例外をレンダリングします。

%F

ソースファイル

ソースファイル名をレンダリングします。 [2]

%h

ホスト名

システムの単純なホスト名をレンダリングします。

%H

修飾ホスト名

システムの完全修飾ホスト名を表示します。オペレーティングシステムの設定によっては、単純なホスト名と同じになる場合があります。

%i

プロセスID

現在のプロセスPIDをレンダリングします。

%l

ソースの場所

ソースファイル名、行番号、クラス名、メソッド名を含むソース・ロケーション情報をレンダリングします。 [2]

%L

ソースライン

ソース行番号をレンダリングします。 [2]

%m

フルメッセージ

ログメッセージと例外(もしあれば)を表示します。

%M

ソース・メソッド

ソースメソッド名をレンダリングします。 [2]

%n

改行

プラットフォーム固有の改行文字列をレンダリングします。

%N

プロセス名

現在のプロセスの名前をレンダリングします。

%p

レベル

メッセージのログレベルをレンダリングします。

%r

相対時間

アプリケーションログの開始からの時間をミリ秒単位でレンダリングします。

%s

シンプルなメッセージ

ログメッセージのみを表示し、例外のトレースは表示しません。

%t

スレッド名

スレッド名をレンダリングします。

%t{id}

スレッドID

スレッドIDをレンダリングします。

%z{<zone name>}

タイムゾーン

出力のタイムゾーンを <zone name> に設定します。

%X{<MDC property name>}

マッピングされた診断コンテキスト値

Mapped Diagnostic Context から値をレンダリングします。

%X

マッピングされた診断コンテキスト値

マッピングされた診断コンテキストからのすべての値を {property.key=property.value} フォーマットでレンダリングします。

%x

入れ子診断のコンテキスト値

ネストされた診断コンテキストからのすべての値を {value1.value2} フォーマットでレンダリングします。

JSONロギングフォーマット

Add the quarkus-logging-json extension to enable the JSON logging format and its related configuration.

  1. 以下のスニペットのように、このエクステンションをビルドファイルに追加してください:

    pom.xml
    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-logging-json</artifactId>
    </dependency>
    build.gradle
    implementation("io.quarkus:quarkus-logging-json")

    デフォルトでは、このエクステンションはコンソールの出力フォーマット設定をオーバーライドし、フォーマット文字列や色設定は無視されます。非同期ロギングやログレベルを制御する項目を含む、その他のコンソール設定項目は引き続き適用されます。

    開発モードでは人間が読める構造化されていないロギングを使用し、本番モードでは JSON 構造化ロギングを使用したい場合は、以下の設定のようにプロファイルを使用して設定してください。

  2. 開発モードおよびテストモードで application.properties の JSON ロギングを無効にします。

    %dev.quarkus.log.console.json.enabled=false
    %test.quarkus.log.console.json.enabled=false
  3. 設定プロパティーを設定して、JSON コンソールログフォーマットを選択します。

    quarkus.log.console.json.log-format

    このプロパティーは、コンソールの JSON ログフォーマットを設定します。

    指定可能な値は以下の通りです。

    • default: Generates structured logs based on the key-value pairs present in the log record. Mapped Diagnostic Context (MDC) and Nested Diagnostic Context (NDC) data are included under the mdc and ndc fields.

      Set quarkus.log.console.json.mdc.flat-fields=true to write MDC entries as root-level JSON fields instead of nesting them under mdc. This is useful when a log aggregator (such as OpenSearch or Elasticsearch) needs MDC fields to be queryable as top-level document fields.

      Example: nested MDC (default, flat-fields=false)
      {"timestamp":"...","message":"Handling request","mdc":{"requestId":"abc123","userId":"42"}}
      Example: flat MDC (flat-fields=true)
      {"timestamp":"...","message":"Handling request","requestId":"abc123","userId":"42"}

      The option is available for all handler types:

      • quarkus.log.console.json.mdc.flat-fields

      • quarkus.log.file.json.mdc.flat-fields

      • quarkus.log.syslog.json.mdc.flat-fields

      • quarkus.log.socket.json.mdc.flat-fields

      • Named handlers, such as quarkus.log.handler.console.<name>.json.mdc.flat-fields

    • ecs: Elastic Common Schema (ECS) フォーマットを使用します。このフォーマットは、一部のデフォルトフィールド名を変更し、ECS に合わせるために他のフィールドを追加します。

      フィールドには、@timestamp, log.logger, log.level, process.pid, process.name, process.thread.name, process.thread.id, host.hostname, event.sequence, error.message, error.stack_trace, ecs.version, data_stream.type, service.name, service.version, service.environment が含まれます。

      MDC data is kept in the mdc field, which is not part of the ECS schema. Set mdc.flat-fields to write those entries as root-level fields instead, or add mdc to excluded-keys to leave them out entirely.

    • gcp: Google Cloud フォーマットを使用します。このフォーマットは default フォーマットに従います。

      OpenTelemetry を使用すると、Quarkus は mdc フィールドにあるトレースデータをフラット化し、spanIdtraceSampledtrace にコピーします。trace の値にはプレフィックスが含まれます。

      Google Cloud では、trace フィールドが "projects/<my-trace-project>/traces/12345" フォーマットである必要があります。<my-trace-project> には quarkus.application.name 設定プロパティーの値が使用されます。

Custom JSON fields with JsonProvider

The JsonProvider SPI allows you to dynamically inject additional JSON fields into every log record at formatting time. Each registered provider’s writeTo method is called once per log record, receiving a JsonLogGenerator and the ExtLogRecord being formatted.

Providers can inspect the log record (level, logger name, MDC values, message, etc.) to decide which fields, if any, to add. Any keys listed in quarkus.log.*.json.excluded-keys are still filtered, even when written by a provider.

CDI registration

In a Quarkus application, the preferred way to register a JsonProvider is as a CDI bean:

import jakarta.enterprise.context.ApplicationScoped;
import org.jboss.logmanager.ExtLogRecord;
import org.jboss.logmanager.Level;
import io.quarkus.logging.json.runtime.JsonProvider;
import io.quarkus.logging.json.runtime.JsonFormatter.JsonLogGenerator;

@ApplicationScoped
public class MyJsonProvider implements JsonProvider {

    @Override
    public void writeTo(JsonLogGenerator generator, ExtLogRecord record) throws Exception {
        // Add a static field to every log record
        generator.add("environment", "production");

        // Conditionally add a field based on the log level
        if (record.getLevel().intValue() >= Level.ERROR.intValue()) {
            generator.add("alert", "true");
        }

        // Add an MDC value as a top-level field
        String requestId = record.getMDC("requestId");
        if (requestId != null) {
            generator.add("requestId", requestId);
        }

        // Add a nested JSON object
        generator.startObject("metadata")
                .add("version", "1.0")
                .add("region", "us-east-1")
                .endObject();
    }
}
ServiceLoader registration

For providers that must work without CDI (for example, in libraries or during early startup), register them via the Java ServiceLoader mechanism. Create a file named META-INF/services/io.quarkus.logging.json.runtime.JsonProvider containing the fully qualified class name of each implementation:

com.example.MyJsonProvider

The implementation does not need to be a CDI bean:

import io.quarkus.logging.json.runtime.JsonProvider;
import io.quarkus.logging.json.runtime.JsonFormatter.JsonLogGenerator;
import org.jboss.logmanager.ExtLogRecord;

public class MyJsonProvider implements JsonProvider {

    @Override
    public void writeTo(JsonLogGenerator generator, ExtLogRecord record) throws Exception {
        generator.add("source", "my-library");
    }
}
When both CDI beans and ServiceLoader providers are present, all of them are called for each log record. ServiceLoader providers are called first, in the order they appear in the META-INF/services/ configuration file. CDI beans are called afterwards, but their relative order is not guaranteed.

設定

サポートされているプロパティを使用してJSONロギングエクステンションを設定し、その動作をカスタマイズしてください。

ビルド時に固定される設定プロパティ - 他のすべての設定プロパティは、実行時にオーバーライド可能

Configuration property

タイプ

デフォルト

The log level of the root category, which is used as the default log level for all categories.

JBoss Logging supports Apache-style log levels:

  • org.jboss.logmanager.Level#FATAL

  • org.jboss.logmanager.Level#ERROR

  • org.jboss.logmanager.Level#WARN

  • org.jboss.logmanager.Level#INFO

  • org.jboss.logmanager.Level#DEBUG

  • org.jboss.logmanager.Level#TRACE

In addition, it also supports the standard JDK log levels.

Environment variable: QUARKUS_LOG_LEVEL

Show more

Level

INFO

Console logging

タイプ

デフォルト

If console logging should be enabled

Environment variable: QUARKUS_LOG_CONSOLE_ENABLED

Show more

boolean

true

If console logging should go to System#err instead of System#out.

Environment variable: QUARKUS_LOG_CONSOLE_STDERR

Show more

boolean

false

The log format. Note that this value is ignored if an extension is present that takes control of console formatting (e.g., an XML or JSON-format extension).

Environment variable: QUARKUS_LOG_CONSOLE_FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n

The console log level.

Environment variable: QUARKUS_LOG_CONSOLE_LEVEL

Show more

Level

ALL

Specify how much the colors should be darkened. Note that this value is ignored if an extension is present that takes control of console formatting (e.g., an XML or JSON-format extension).

Environment variable: QUARKUS_LOG_CONSOLE_DARKEN

Show more

int

0

The name of the filter to link to the console handler.

Environment variable: QUARKUS_LOG_CONSOLE_FILTER

Show more

string

Whether to log asynchronously

Environment variable: QUARKUS_LOG_CONSOLE_ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_CONSOLE_ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_CONSOLE_ASYNC_OVERFLOW

Show more

block, discard

block

File logging

タイプ

デフォルト

If file logging should be enabled

Environment variable: QUARKUS_LOG_FILE_ENABLED

Show more

boolean

false

The log format

Environment variable: QUARKUS_LOG_FILE_FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %h %N[%i] %-5p [%c{3.}] (%t) %s%e%n

The level of logs to be written into the file.

Environment variable: QUARKUS_LOG_FILE_LEVEL

Show more

Level

ALL

The name of the file in which logs will be written.

Environment variable: QUARKUS_LOG_FILE_PATH

Show more

File

quarkus.log

The name of the filter to link to the file handler.

Environment variable: QUARKUS_LOG_FILE_FILTER

Show more

string

The character encoding used

Environment variable: QUARKUS_LOG_FILE_ENCODING

Show more

Charset

Whether to log asynchronously

Environment variable: QUARKUS_LOG_FILE_ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_FILE_ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_FILE_ASYNC_OVERFLOW

Show more

block, discard

block

Whether log rotation is enabled.

Environment variable: QUARKUS_LOG_FILE_ROTATION_ENABLED

Show more

boolean

true

The maximum log file size, after which a rotation is executed, up to Long.MAX_VALUE bytes. Note that the file is rotated after the log record is written. Thus, this isn’t a hard maximum on the file size; rather, it’s a hard minimum on the size of the file before it is rotated.

Environment variable: QUARKUS_LOG_FILE_ROTATION_MAX_FILE_SIZE

Show more

MemorySize 

10M

The maximum number of backups to keep.

Environment variable: QUARKUS_LOG_FILE_ROTATION_MAX_BACKUP_INDEX

Show more

int

5

The file handler rotation file suffix. When used, the file will be rotated based on its suffix.

The suffix must be in a date-time format that is understood by DateTimeFormatter.

Example fileSuffix: .yyyy-MM-dd

Note: If the suffix ends with .zip or .gz, the rotation file will also be compressed.

Environment variable: QUARKUS_LOG_FILE_ROTATION_FILE_SUFFIX

Show more

string

Indicates whether to rotate log files on server initialization.

You need to either set a max-file-size or configure a file-suffix for it to work.

Environment variable: QUARKUS_LOG_FILE_ROTATION_ROTATE_ON_BOOT

Show more

boolean

true

Syslog logging

タイプ

デフォルト

If syslog logging should be enabled

Environment variable: QUARKUS_LOG_SYSLOG_ENABLED

Show more

boolean

false

The IP address and port of the Syslog server

Environment variable: QUARKUS_LOG_SYSLOG_ENDPOINT

Show more

host:port

localhost:514

The app name used when formatting the message in RFC5424 format

Environment variable: QUARKUS_LOG_SYSLOG_APP_NAME

Show more

string

The name of the host the messages are being sent from

Environment variable: QUARKUS_LOG_SYSLOG_HOSTNAME

Show more

string

Sets the facility used when calculating the priority of the message as defined by RFC-5424 and RFC-3164

Environment variable: QUARKUS_LOG_SYSLOG_FACILITY

Show more

kernel, user-level, mail-system, system-daemons, security, syslogd, line-printer, network-news, uucp, clock-daemon, security2, ftp-daemon, ntp, log-audit, log-alert, clock-daemon2, local-use-0, local-use-1, local-use-2, local-use-3, local-use-4, local-use-5, local-use-6, local-use-7

user-level

Set the SyslogType syslog type this handler should use to format the message sent

Environment variable: QUARKUS_LOG_SYSLOG_SYSLOG_TYPE

Show more

rfc5424, rfc3164

rfc5424

Sets the protocol used to connect to the Syslog server

Environment variable: QUARKUS_LOG_SYSLOG_PROTOCOL

Show more

tcp, udp, ssl-tcp

tcp

If enabled, the message being sent is prefixed with the size of the message

Environment variable: QUARKUS_LOG_SYSLOG_USE_COUNTING_FRAMING

Show more

true, false, protocol-dependent

protocol-dependent

Set to true to truncate the message if it exceeds maximum length

Environment variable: QUARKUS_LOG_SYSLOG_TRUNCATE

Show more

boolean

true

Enables or disables blocking when attempting to reconnect a Protocol#TCP TCP or Protocol#SSL_TCP SSL TCP protocol

Environment variable: QUARKUS_LOG_SYSLOG_BLOCK_ON_RECONNECT

Show more

boolean

false

The log message format

Environment variable: QUARKUS_LOG_SYSLOG_FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n

The log level specifying what message levels will be logged by the Syslog logger

Environment variable: QUARKUS_LOG_SYSLOG_LEVEL

Show more

Level

ALL

The name of the filter to link to the file handler.

Environment variable: QUARKUS_LOG_SYSLOG_FILTER

Show more

string

The maximum length, in bytes, of the message allowed to be sent, up to Integer.MAX_VALUE bytes. The length includes the header and the message.

If not set, the default value is 2048 when sys-log-type is rfc5424 (which is the default) and 1024 when sys-log-type is rfc3164

Environment variable: QUARKUS_LOG_SYSLOG_MAX_LENGTH

Show more

MemorySize 

Whether to log asynchronously

Environment variable: QUARKUS_LOG_SYSLOG_ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_SYSLOG_ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_SYSLOG_ASYNC_OVERFLOW

Show more

block, discard

block

Socket logging

タイプ

デフォルト

If socket logging should be enabled

Environment variable: QUARKUS_LOG_SOCKET_ENABLED

Show more

boolean

false

The IP address and port of the server receiving the logs

Environment variable: QUARKUS_LOG_SOCKET_ENDPOINT

Show more

host:port

localhost:4560

Sets the protocol used to connect to the syslog server

Environment variable: QUARKUS_LOG_SOCKET_PROTOCOL

Show more

tcp, udp, ssl-tcp

tcp

Enables or disables blocking when attempting to reconnect a Protocol#TCP TCP or Protocol#SSL_TCP SSL TCP protocol

Environment variable: QUARKUS_LOG_SOCKET_BLOCK_ON_RECONNECT

Show more

boolean

false

The log message format

Environment variable: QUARKUS_LOG_SOCKET_FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n

The log level specifying, which message levels will be logged by socket logger

Environment variable: QUARKUS_LOG_SOCKET_LEVEL

Show more

Level

ALL

The name of the filter to link to the file handler.

Environment variable: QUARKUS_LOG_SOCKET_FILTER

Show more

string

Whether to log asynchronously

Environment variable: QUARKUS_LOG_SOCKET_ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_SOCKET_ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_SOCKET_ASYNC_OVERFLOW

Show more

block, discard

block

Logging categories

タイプ

デフォルト

The log level for this category.

Note that to get log levels below INFO, the minimum level build-time configuration option also needs to be adjusted.

Environment variable: QUARKUS_LOG_CATEGORY__CATEGORIES__LEVEL

Show more

InheritableLevel

inherit

The names of the handlers to link to this category.

Environment variable: QUARKUS_LOG_CATEGORY__CATEGORIES__HANDLERS

Show more

文字列のリスト

Specify whether this logger should send its output to its parent Logger

Environment variable: QUARKUS_LOG_CATEGORY__CATEGORIES__USE_PARENT_HANDLERS

Show more

boolean

true

Console handlers

タイプ

デフォルト

If console logging should be enabled

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__CONSOLE_HANDLERS__ENABLED

Show more

boolean

true

If console logging should go to System#err instead of System#out.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__CONSOLE_HANDLERS__STDERR

Show more

boolean

false

The log format. Note that this value is ignored if an extension is present that takes control of console formatting (e.g., an XML or JSON-format extension).

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__CONSOLE_HANDLERS__FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n

The console log level.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__CONSOLE_HANDLERS__LEVEL

Show more

Level

ALL

Specify how much the colors should be darkened. Note that this value is ignored if an extension is present that takes control of console formatting (e.g., an XML or JSON-format extension).

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__CONSOLE_HANDLERS__DARKEN

Show more

int

0

The name of the filter to link to the console handler.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__CONSOLE_HANDLERS__FILTER

Show more

string

Whether to log asynchronously

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__CONSOLE_HANDLERS__ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__CONSOLE_HANDLERS__ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__CONSOLE_HANDLERS__ASYNC_OVERFLOW

Show more

block, discard

block

If console logging should be enabled

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__ENABLED

Show more

boolean

true

If console logging should go to System#err instead of System#out.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__STDERR

Show more

boolean

false

The log format. Note that this value is ignored if an extension is present that takes control of console formatting (e.g., an XML or JSON-format extension).

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n

The console log level.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__LEVEL

Show more

Level

ALL

Specify how much the colors should be darkened. Note that this value is ignored if an extension is present that takes control of console formatting (e.g., an XML or JSON-format extension).

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__DARKEN

Show more

int

0

The name of the filter to link to the console handler.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__FILTER

Show more

string

Whether to log asynchronously

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__ASYNC_OVERFLOW

Show more

block, discard

block

JSON logging configuration

タイプ

デフォルト

Determine whether to enable the JSON console formatting extension, which disables "normal" console formatting.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__JSON_ENABLED

Show more

boolean

Enable "pretty printing" of the JSON record. Note that some JSON parsers will fail to read the pretty printed output.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__JSON_PRETTY_PRINT

Show more

boolean

false

The date format to use. The special string "default" indicates that the default format should be used.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__JSON_DATE_FORMAT

Show more

string

default

The special end-of-record delimiter to be used. By default, newline is used.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__JSON_RECORD_DELIMITER

Show more

string

The zone ID to use. The special string "default" indicates that the default zone should be used.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__JSON_ZONE_ID

Show more

string

default

The exception output type to specify.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__JSON_EXCEPTION_OUTPUT_TYPE

Show more

detailed, formatted, detailed-and-formatted

detailed

Enable printing of more details in the log.

詳細の表示は、呼び出し元から値を取得するため、コストがかかる場合があります。詳細には、ソースクラス名、ソースファイル名、ソースメソッド名、ソース行番号などが含まれます。

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__JSON_PRINT_DETAILS

Show more

boolean

false

Override keys with custom values. Omitting this value indicates that no key overrides will be applied.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__JSON_KEY_OVERRIDES

Show more

string

Keys to be excluded from the JSON output.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__JSON_EXCLUDED_KEYS

Show more

文字列のリスト

Additional field value.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__JSON_ADDITIONAL_FIELD__FIELD_NAME__VALUE

Show more

string

required

Additional field type specification. Supported types: string, int, and long. String is the default if not specified.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__JSON_ADDITIONAL_FIELD__FIELD_NAME__TYPE

Show more

string, int, long

string

Specify the format of the produced JSON

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__JSON_LOG_FORMAT

Show more

default, ecs, gcp

default

When true, MDC entries are written as root-level JSON fields instead of being grouped under a nested "mdc" object.

This is useful when log aggregators (such as OpenSearch or Elasticsearch) expect MDC fields to be queryable as top-level document fields rather than nested properties.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__JSON_CONSOLE_HANDLERS__JSON_MDC_FLAT_FIELDS

Show more

boolean

false

File handlers

タイプ

デフォルト

If file logging should be enabled

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ENABLED

Show more

boolean

false

The log format

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %h %N[%i] %-5p [%c{3.}] (%t) %s%e%n

The level of logs to be written into the file.

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__LEVEL

Show more

Level

ALL

The name of the file in which logs will be written.

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__PATH

Show more

File

quarkus.log

The name of the filter to link to the file handler.

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__FILTER

Show more

string

The character encoding used

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ENCODING

Show more

Charset

Whether to log asynchronously

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ASYNC_OVERFLOW

Show more

block, discard

block

Whether log rotation is enabled.

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ROTATION_ENABLED

Show more

boolean

true

The maximum log file size, after which a rotation is executed, up to Long.MAX_VALUE bytes. Note that the file is rotated after the log record is written. Thus, this isn’t a hard maximum on the file size; rather, it’s a hard minimum on the size of the file before it is rotated.

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ROTATION_MAX_FILE_SIZE

Show more

MemorySize 

10M

The maximum number of backups to keep.

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ROTATION_MAX_BACKUP_INDEX

Show more

int

5

The file handler rotation file suffix. When used, the file will be rotated based on its suffix.

The suffix must be in a date-time format that is understood by DateTimeFormatter.

Example fileSuffix: .yyyy-MM-dd

Note: If the suffix ends with .zip or .gz, the rotation file will also be compressed.

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ROTATION_FILE_SUFFIX

Show more

string

Indicates whether to rotate log files on server initialization.

You need to either set a max-file-size or configure a file-suffix for it to work.

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ROTATION_ROTATE_ON_BOOT

Show more

boolean

true

If file logging should be enabled

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__ENABLED

Show more

boolean

false

The log format

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %h %N[%i] %-5p [%c{3.}] (%t) %s%e%n

The level of logs to be written into the file.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__LEVEL

Show more

Level

ALL

The name of the file in which logs will be written.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__PATH

Show more

File

quarkus.log

The name of the filter to link to the file handler.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__FILTER

Show more

string

The character encoding used

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__ENCODING

Show more

Charset

Whether to log asynchronously

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__ASYNC_OVERFLOW

Show more

block, discard

block

Whether log rotation is enabled.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__ROTATION_ENABLED

Show more

boolean

true

The maximum log file size, after which a rotation is executed, up to Long.MAX_VALUE bytes. Note that the file is rotated after the log record is written. Thus, this isn’t a hard maximum on the file size; rather, it’s a hard minimum on the size of the file before it is rotated.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__ROTATION_MAX_FILE_SIZE

Show more

MemorySize 

10M

The maximum number of backups to keep.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__ROTATION_MAX_BACKUP_INDEX

Show more

int

5

The file handler rotation file suffix. When used, the file will be rotated based on its suffix.

The suffix must be in a date-time format that is understood by DateTimeFormatter.

Example fileSuffix: .yyyy-MM-dd

Note: If the suffix ends with .zip or .gz, the rotation file will also be compressed.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__ROTATION_FILE_SUFFIX

Show more

string

Indicates whether to rotate log files on server initialization.

You need to either set a max-file-size or configure a file-suffix for it to work.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__ROTATION_ROTATE_ON_BOOT

Show more

boolean

true

JSON logging configuration

タイプ

デフォルト

Determine whether to enable the JSON console formatting extension, which disables "normal" console formatting.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__JSON_ENABLED

Show more

boolean

Enable "pretty printing" of the JSON record. Note that some JSON parsers will fail to read the pretty printed output.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__JSON_PRETTY_PRINT

Show more

boolean

false

The date format to use. The special string "default" indicates that the default format should be used.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__JSON_DATE_FORMAT

Show more

string

default

The special end-of-record delimiter to be used. By default, newline is used.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__JSON_RECORD_DELIMITER

Show more

string

The zone ID to use. The special string "default" indicates that the default zone should be used.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__JSON_ZONE_ID

Show more

string

default

The exception output type to specify.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__JSON_EXCEPTION_OUTPUT_TYPE

Show more

detailed, formatted, detailed-and-formatted

detailed

Enable printing of more details in the log.

詳細の表示は、呼び出し元から値を取得するため、コストがかかる場合があります。詳細には、ソースクラス名、ソースファイル名、ソースメソッド名、ソース行番号などが含まれます。

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__JSON_PRINT_DETAILS

Show more

boolean

false

Override keys with custom values. Omitting this value indicates that no key overrides will be applied.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__JSON_KEY_OVERRIDES

Show more

string

Keys to be excluded from the JSON output.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__JSON_EXCLUDED_KEYS

Show more

文字列のリスト

Additional field value.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__JSON_ADDITIONAL_FIELD__FIELD_NAME__VALUE

Show more

string

required

Additional field type specification. Supported types: string, int, and long. String is the default if not specified.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__JSON_ADDITIONAL_FIELD__FIELD_NAME__TYPE

Show more

string, int, long

string

Specify the format of the produced JSON

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__JSON_LOG_FORMAT

Show more

default, ecs, gcp

default

When true, MDC entries are written as root-level JSON fields instead of being grouped under a nested "mdc" object.

This is useful when log aggregators (such as OpenSearch or Elasticsearch) expect MDC fields to be queryable as top-level document fields rather than nested properties.

Environment variable: QUARKUS_LOG_HANDLER_FILE__JSON_FILE_HANDLERS__JSON_MDC_FLAT_FIELDS

Show more

boolean

false

Syslog handlers

タイプ

デフォルト

If syslog logging should be enabled

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__ENABLED

Show more

boolean

false

The IP address and port of the Syslog server

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__ENDPOINT

Show more

host:port

localhost:514

The app name used when formatting the message in RFC5424 format

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__APP_NAME

Show more

string

The name of the host the messages are being sent from

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__HOSTNAME

Show more

string

Sets the facility used when calculating the priority of the message as defined by RFC-5424 and RFC-3164

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__FACILITY

Show more

kernel, user-level, mail-system, system-daemons, security, syslogd, line-printer, network-news, uucp, clock-daemon, security2, ftp-daemon, ntp, log-audit, log-alert, clock-daemon2, local-use-0, local-use-1, local-use-2, local-use-3, local-use-4, local-use-5, local-use-6, local-use-7

user-level

Set the SyslogType syslog type this handler should use to format the message sent

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__SYSLOG_TYPE

Show more

rfc5424, rfc3164

rfc5424

Sets the protocol used to connect to the Syslog server

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__PROTOCOL

Show more

tcp, udp, ssl-tcp

tcp

If enabled, the message being sent is prefixed with the size of the message

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__USE_COUNTING_FRAMING

Show more

true, false, protocol-dependent

protocol-dependent

Set to true to truncate the message if it exceeds maximum length

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__TRUNCATE

Show more

boolean

true

Enables or disables blocking when attempting to reconnect a Protocol#TCP TCP or Protocol#SSL_TCP SSL TCP protocol

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__BLOCK_ON_RECONNECT

Show more

boolean

false

The log message format

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n

The log level specifying what message levels will be logged by the Syslog logger

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__LEVEL

Show more

Level

ALL

The name of the filter to link to the file handler.

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__FILTER

Show more

string

The maximum length, in bytes, of the message allowed to be sent, up to Integer.MAX_VALUE bytes. The length includes the header and the message.

If not set, the default value is 2048 when sys-log-type is rfc5424 (which is the default) and 1024 when sys-log-type is rfc3164

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__MAX_LENGTH

Show more

MemorySize 

Whether to log asynchronously

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__ASYNC_OVERFLOW

Show more

block, discard

block

If syslog logging should be enabled

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__ENABLED

Show more

boolean

false

The IP address and port of the Syslog server

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__ENDPOINT

Show more

host:port

localhost:514

The app name used when formatting the message in RFC5424 format

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__APP_NAME

Show more

string

The name of the host the messages are being sent from

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__HOSTNAME

Show more

string

Sets the facility used when calculating the priority of the message as defined by RFC-5424 and RFC-3164

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__FACILITY

Show more

kernel, user-level, mail-system, system-daemons, security, syslogd, line-printer, network-news, uucp, clock-daemon, security2, ftp-daemon, ntp, log-audit, log-alert, clock-daemon2, local-use-0, local-use-1, local-use-2, local-use-3, local-use-4, local-use-5, local-use-6, local-use-7

user-level

Set the SyslogType syslog type this handler should use to format the message sent

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__SYSLOG_TYPE

Show more

rfc5424, rfc3164

rfc5424

Sets the protocol used to connect to the Syslog server

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__PROTOCOL

Show more

tcp, udp, ssl-tcp

tcp

If enabled, the message being sent is prefixed with the size of the message

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__USE_COUNTING_FRAMING

Show more

true, false, protocol-dependent

protocol-dependent

Set to true to truncate the message if it exceeds maximum length

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__TRUNCATE

Show more

boolean

true

Enables or disables blocking when attempting to reconnect a Protocol#TCP TCP or Protocol#SSL_TCP SSL TCP protocol

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__BLOCK_ON_RECONNECT

Show more

boolean

false

The log message format

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n

The log level specifying what message levels will be logged by the Syslog logger

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__LEVEL

Show more

Level

ALL

The name of the filter to link to the file handler.

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__FILTER

Show more

string

The maximum length, in bytes, of the message allowed to be sent, up to Integer.MAX_VALUE bytes. The length includes the header and the message.

If not set, the default value is 2048 when sys-log-type is rfc5424 (which is the default) and 1024 when sys-log-type is rfc3164

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__MAX_LENGTH

Show more

MemorySize 

Whether to log asynchronously

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__ASYNC_OVERFLOW

Show more

block, discard

block

JSON logging configuration

タイプ

デフォルト

Determine whether to enable the JSON console formatting extension, which disables "normal" console formatting.

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__JSON_ENABLED

Show more

boolean

Enable "pretty printing" of the JSON record. Note that some JSON parsers will fail to read the pretty printed output.

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__JSON_PRETTY_PRINT

Show more

boolean

false

The date format to use. The special string "default" indicates that the default format should be used.

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__JSON_DATE_FORMAT

Show more

string

default

The special end-of-record delimiter to be used. By default, newline is used.

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__JSON_RECORD_DELIMITER

Show more

string

The zone ID to use. The special string "default" indicates that the default zone should be used.

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__JSON_ZONE_ID

Show more

string

default

The exception output type to specify.

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__JSON_EXCEPTION_OUTPUT_TYPE

Show more

detailed, formatted, detailed-and-formatted

detailed

Enable printing of more details in the log.

詳細の表示は、呼び出し元から値を取得するため、コストがかかる場合があります。詳細には、ソースクラス名、ソースファイル名、ソースメソッド名、ソース行番号などが含まれます。

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__JSON_PRINT_DETAILS

Show more

boolean

false

Override keys with custom values. Omitting this value indicates that no key overrides will be applied.

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__JSON_KEY_OVERRIDES

Show more

string

Keys to be excluded from the JSON output.

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__JSON_EXCLUDED_KEYS

Show more

文字列のリスト

Additional field value.

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__JSON_ADDITIONAL_FIELD__FIELD_NAME__VALUE

Show more

string

required

Additional field type specification. Supported types: string, int, and long. String is the default if not specified.

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__JSON_ADDITIONAL_FIELD__FIELD_NAME__TYPE

Show more

string, int, long

string

Specify the format of the produced JSON

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__JSON_LOG_FORMAT

Show more

default, ecs, gcp

default

When true, MDC entries are written as root-level JSON fields instead of being grouped under a nested "mdc" object.

This is useful when log aggregators (such as OpenSearch or Elasticsearch) expect MDC fields to be queryable as top-level document fields rather than nested properties.

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__JSON_SYSLOG_HANDLERS__JSON_MDC_FLAT_FIELDS

Show more

boolean

false

Socket handlers

タイプ

デフォルト

If socket logging should be enabled

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__ENABLED

Show more

boolean

false

The IP address and port of the server receiving the logs

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__ENDPOINT

Show more

host:port

localhost:4560

Sets the protocol used to connect to the syslog server

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__PROTOCOL

Show more

tcp, udp, ssl-tcp

tcp

Enables or disables blocking when attempting to reconnect a Protocol#TCP TCP or Protocol#SSL_TCP SSL TCP protocol

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__BLOCK_ON_RECONNECT

Show more

boolean

false

The log message format

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n

The log level specifying, which message levels will be logged by socket logger

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__LEVEL

Show more

Level

ALL

The name of the filter to link to the file handler.

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__FILTER

Show more

string

Whether to log asynchronously

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__ASYNC_OVERFLOW

Show more

block, discard

block

If socket logging should be enabled

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__ENABLED

Show more

boolean

false

The IP address and port of the server receiving the logs

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__ENDPOINT

Show more

host:port

localhost:4560

Sets the protocol used to connect to the syslog server

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__PROTOCOL

Show more

tcp, udp, ssl-tcp

tcp

Enables or disables blocking when attempting to reconnect a Protocol#TCP TCP or Protocol#SSL_TCP SSL TCP protocol

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__BLOCK_ON_RECONNECT

Show more

boolean

false

The log message format

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n

The log level specifying, which message levels will be logged by socket logger

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__LEVEL

Show more

Level

ALL

The name of the filter to link to the file handler.

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__FILTER

Show more

string

Whether to log asynchronously

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__ASYNC_OVERFLOW

Show more

block, discard

block

JSON logging configuration

タイプ

デフォルト

Determine whether to enable the JSON console formatting extension, which disables "normal" console formatting.

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__JSON_ENABLED

Show more

boolean

Enable "pretty printing" of the JSON record. Note that some JSON parsers will fail to read the pretty printed output.

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__JSON_PRETTY_PRINT

Show more

boolean

false

The date format to use. The special string "default" indicates that the default format should be used.

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__JSON_DATE_FORMAT

Show more

string

default

The special end-of-record delimiter to be used. By default, newline is used.

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__JSON_RECORD_DELIMITER

Show more

string

The zone ID to use. The special string "default" indicates that the default zone should be used.

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__JSON_ZONE_ID

Show more

string

default

The exception output type to specify.

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__JSON_EXCEPTION_OUTPUT_TYPE

Show more

detailed, formatted, detailed-and-formatted

detailed

Enable printing of more details in the log.

詳細の表示は、呼び出し元から値を取得するため、コストがかかる場合があります。詳細には、ソースクラス名、ソースファイル名、ソースメソッド名、ソース行番号などが含まれます。

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__JSON_PRINT_DETAILS

Show more

boolean

false

Override keys with custom values. Omitting this value indicates that no key overrides will be applied.

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__JSON_KEY_OVERRIDES

Show more

string

Keys to be excluded from the JSON output.

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__JSON_EXCLUDED_KEYS

Show more

文字列のリスト

Additional field value.

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__JSON_ADDITIONAL_FIELD__FIELD_NAME__VALUE

Show more

string

required

Additional field type specification. Supported types: string, int, and long. String is the default if not specified.

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__JSON_ADDITIONAL_FIELD__FIELD_NAME__TYPE

Show more

string, int, long

string

Specify the format of the produced JSON

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__JSON_LOG_FORMAT

Show more

default, ecs, gcp

default

When true, MDC entries are written as root-level JSON fields instead of being grouped under a nested "mdc" object.

This is useful when log aggregators (such as OpenSearch or Elasticsearch) expect MDC fields to be queryable as top-level document fields rather than nested properties.

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__JSON_SOCKET_HANDLERS__JSON_MDC_FLAT_FIELDS

Show more

boolean

false

Log cleanup filters - internal use

タイプ

デフォルト

The message prefix to match

Environment variable: QUARKUS_LOG_FILTER__FILTERS__IF_STARTS_WITH

Show more

文字列のリスト

inherit

The new log level for the filtered message. Defaults to DEBUG.

Environment variable: QUARKUS_LOG_FILTER__FILTERS__TARGET_LEVEL

Show more

Level

DEBUG

The names of additional handlers to link to the root category. These handlers are defined in consoleHandlers, fileHandlers, or syslogHandlers.

Environment variable: QUARKUS_LOG_HANDLERS

Show more

文字列のリスト

Console logging

タイプ

デフォルト

Determine whether to enable the JSON console formatting extension, which disables "normal" console formatting.

Environment variable: QUARKUS_LOG_CONSOLE_JSON_ENABLED

Show more

boolean

Enable "pretty printing" of the JSON record. Note that some JSON parsers will fail to read the pretty printed output.

Environment variable: QUARKUS_LOG_CONSOLE_JSON_PRETTY_PRINT

Show more

boolean

false

The date format to use. The special string "default" indicates that the default format should be used.

Environment variable: QUARKUS_LOG_CONSOLE_JSON_DATE_FORMAT

Show more

string

default

The special end-of-record delimiter to be used. By default, newline is used.

Environment variable: QUARKUS_LOG_CONSOLE_JSON_RECORD_DELIMITER

Show more

string

The zone ID to use. The special string "default" indicates that the default zone should be used.

Environment variable: QUARKUS_LOG_CONSOLE_JSON_ZONE_ID

Show more

string

default

The exception output type to specify.

Environment variable: QUARKUS_LOG_CONSOLE_JSON_EXCEPTION_OUTPUT_TYPE

Show more

detailed, formatted, detailed-and-formatted

detailed

Enable printing of more details in the log.

詳細の表示は、呼び出し元から値を取得するため、コストがかかる場合があります。詳細には、ソースクラス名、ソースファイル名、ソースメソッド名、ソース行番号などが含まれます。

Environment variable: QUARKUS_LOG_CONSOLE_JSON_PRINT_DETAILS

Show more

boolean

false

Override keys with custom values. Omitting this value indicates that no key overrides will be applied.

Environment variable: QUARKUS_LOG_CONSOLE_JSON_KEY_OVERRIDES

Show more

string

Keys to be excluded from the JSON output.

Environment variable: QUARKUS_LOG_CONSOLE_JSON_EXCLUDED_KEYS

Show more

文字列のリスト

Additional field value.

Environment variable: QUARKUS_LOG_CONSOLE_JSON_ADDITIONAL_FIELD__FIELD_NAME__VALUE

Show more

string

required

Additional field type specification. Supported types: string, int, and long. String is the default if not specified.

Environment variable: QUARKUS_LOG_CONSOLE_JSON_ADDITIONAL_FIELD__FIELD_NAME__TYPE

Show more

string, int, long

string

Specify the format of the produced JSON

Environment variable: QUARKUS_LOG_CONSOLE_JSON_LOG_FORMAT

Show more

default, ecs, gcp

default

When true, MDC entries are written as root-level JSON fields instead of being grouped under a nested "mdc" object.

This is useful when log aggregators (such as OpenSearch or Elasticsearch) expect MDC fields to be queryable as top-level document fields rather than nested properties.

Environment variable: QUARKUS_LOG_CONSOLE_JSON_MDC_FLAT_FIELDS

Show more

boolean

false

File logging

タイプ

デフォルト

Determine whether to enable the JSON console formatting extension, which disables "normal" console formatting.

Environment variable: QUARKUS_LOG_FILE_JSON_ENABLED

Show more

boolean

Enable "pretty printing" of the JSON record. Note that some JSON parsers will fail to read the pretty printed output.

Environment variable: QUARKUS_LOG_FILE_JSON_PRETTY_PRINT

Show more

boolean

false

The date format to use. The special string "default" indicates that the default format should be used.

Environment variable: QUARKUS_LOG_FILE_JSON_DATE_FORMAT

Show more

string

default

The special end-of-record delimiter to be used. By default, newline is used.

Environment variable: QUARKUS_LOG_FILE_JSON_RECORD_DELIMITER

Show more

string

The zone ID to use. The special string "default" indicates that the default zone should be used.

Environment variable: QUARKUS_LOG_FILE_JSON_ZONE_ID

Show more

string

default

The exception output type to specify.

Environment variable: QUARKUS_LOG_FILE_JSON_EXCEPTION_OUTPUT_TYPE

Show more

detailed, formatted, detailed-and-formatted

detailed

Enable printing of more details in the log.

詳細の表示は、呼び出し元から値を取得するため、コストがかかる場合があります。詳細には、ソースクラス名、ソースファイル名、ソースメソッド名、ソース行番号などが含まれます。

Environment variable: QUARKUS_LOG_FILE_JSON_PRINT_DETAILS

Show more

boolean

false

Override keys with custom values. Omitting this value indicates that no key overrides will be applied.

Environment variable: QUARKUS_LOG_FILE_JSON_KEY_OVERRIDES

Show more

string

Keys to be excluded from the JSON output.

Environment variable: QUARKUS_LOG_FILE_JSON_EXCLUDED_KEYS

Show more

文字列のリスト

Additional field value.

Environment variable: QUARKUS_LOG_FILE_JSON_ADDITIONAL_FIELD__FIELD_NAME__VALUE

Show more

string

required

Additional field type specification. Supported types: string, int, and long. String is the default if not specified.

Environment variable: QUARKUS_LOG_FILE_JSON_ADDITIONAL_FIELD__FIELD_NAME__TYPE

Show more

string, int, long

string

Specify the format of the produced JSON

Environment variable: QUARKUS_LOG_FILE_JSON_LOG_FORMAT

Show more

default, ecs, gcp

default

When true, MDC entries are written as root-level JSON fields instead of being grouped under a nested "mdc" object.

This is useful when log aggregators (such as OpenSearch or Elasticsearch) expect MDC fields to be queryable as top-level document fields rather than nested properties.

Environment variable: QUARKUS_LOG_FILE_JSON_MDC_FLAT_FIELDS

Show more

boolean

false

Syslog logging

タイプ

デフォルト

Determine whether to enable the JSON console formatting extension, which disables "normal" console formatting.

Environment variable: QUARKUS_LOG_SYSLOG_JSON_ENABLED

Show more

boolean

Enable "pretty printing" of the JSON record. Note that some JSON parsers will fail to read the pretty printed output.

Environment variable: QUARKUS_LOG_SYSLOG_JSON_PRETTY_PRINT

Show more

boolean

false

The date format to use. The special string "default" indicates that the default format should be used.

Environment variable: QUARKUS_LOG_SYSLOG_JSON_DATE_FORMAT

Show more

string

default

The special end-of-record delimiter to be used. By default, newline is used.

Environment variable: QUARKUS_LOG_SYSLOG_JSON_RECORD_DELIMITER

Show more

string

The zone ID to use. The special string "default" indicates that the default zone should be used.

Environment variable: QUARKUS_LOG_SYSLOG_JSON_ZONE_ID

Show more

string

default

The exception output type to specify.

Environment variable: QUARKUS_LOG_SYSLOG_JSON_EXCEPTION_OUTPUT_TYPE

Show more

detailed, formatted, detailed-and-formatted

detailed

Enable printing of more details in the log.

詳細の表示は、呼び出し元から値を取得するため、コストがかかる場合があります。詳細には、ソースクラス名、ソースファイル名、ソースメソッド名、ソース行番号などが含まれます。

Environment variable: QUARKUS_LOG_SYSLOG_JSON_PRINT_DETAILS

Show more

boolean

false

Override keys with custom values. Omitting this value indicates that no key overrides will be applied.

Environment variable: QUARKUS_LOG_SYSLOG_JSON_KEY_OVERRIDES

Show more

string

Keys to be excluded from the JSON output.

Environment variable: QUARKUS_LOG_SYSLOG_JSON_EXCLUDED_KEYS

Show more

文字列のリスト

Additional field value.

Environment variable: QUARKUS_LOG_SYSLOG_JSON_ADDITIONAL_FIELD__FIELD_NAME__VALUE

Show more

string

required

Additional field type specification. Supported types: string, int, and long. String is the default if not specified.

Environment variable: QUARKUS_LOG_SYSLOG_JSON_ADDITIONAL_FIELD__FIELD_NAME__TYPE

Show more

string, int, long

string

Specify the format of the produced JSON

Environment variable: QUARKUS_LOG_SYSLOG_JSON_LOG_FORMAT

Show more

default, ecs, gcp

default

When true, MDC entries are written as root-level JSON fields instead of being grouped under a nested "mdc" object.

This is useful when log aggregators (such as OpenSearch or Elasticsearch) expect MDC fields to be queryable as top-level document fields rather than nested properties.

Environment variable: QUARKUS_LOG_SYSLOG_JSON_MDC_FLAT_FIELDS

Show more

boolean

false

Socket logging

タイプ

デフォルト

Determine whether to enable the JSON console formatting extension, which disables "normal" console formatting.

Environment variable: QUARKUS_LOG_SOCKET_JSON_ENABLED

Show more

boolean

Enable "pretty printing" of the JSON record. Note that some JSON parsers will fail to read the pretty printed output.

Environment variable: QUARKUS_LOG_SOCKET_JSON_PRETTY_PRINT

Show more

boolean

false

The date format to use. The special string "default" indicates that the default format should be used.

Environment variable: QUARKUS_LOG_SOCKET_JSON_DATE_FORMAT

Show more

string

default

The special end-of-record delimiter to be used. By default, newline is used.

Environment variable: QUARKUS_LOG_SOCKET_JSON_RECORD_DELIMITER

Show more

string

The zone ID to use. The special string "default" indicates that the default zone should be used.

Environment variable: QUARKUS_LOG_SOCKET_JSON_ZONE_ID

Show more

string

default

The exception output type to specify.

Environment variable: QUARKUS_LOG_SOCKET_JSON_EXCEPTION_OUTPUT_TYPE

Show more

detailed, formatted, detailed-and-formatted

detailed

Enable printing of more details in the log.

詳細の表示は、呼び出し元から値を取得するため、コストがかかる場合があります。詳細には、ソースクラス名、ソースファイル名、ソースメソッド名、ソース行番号などが含まれます。

Environment variable: QUARKUS_LOG_SOCKET_JSON_PRINT_DETAILS

Show more

boolean

false

Override keys with custom values. Omitting this value indicates that no key overrides will be applied.

Environment variable: QUARKUS_LOG_SOCKET_JSON_KEY_OVERRIDES

Show more

string

Keys to be excluded from the JSON output.

Environment variable: QUARKUS_LOG_SOCKET_JSON_EXCLUDED_KEYS

Show more

文字列のリスト

Additional field value.

Environment variable: QUARKUS_LOG_SOCKET_JSON_ADDITIONAL_FIELD__FIELD_NAME__VALUE

Show more

string

required

Additional field type specification. Supported types: string, int, and long. String is the default if not specified.

Environment variable: QUARKUS_LOG_SOCKET_JSON_ADDITIONAL_FIELD__FIELD_NAME__TYPE

Show more

string, int, long

string

Specify the format of the produced JSON

Environment variable: QUARKUS_LOG_SOCKET_JSON_LOG_FORMAT

Show more

default, ecs, gcp

default

When true, MDC entries are written as root-level JSON fields instead of being grouped under a nested "mdc" object.

This is useful when log aggregators (such as OpenSearch or Elasticsearch) expect MDC fields to be queryable as top-level document fields rather than nested properties.

Environment variable: QUARKUS_LOG_SOCKET_JSON_MDC_FLAT_FIELDS

Show more

boolean

false

MemorySizeフォーマットについて

A size configuration option recognizes strings in this format (shown as a regular expression): [0-9]+[KkMmGgTtPpEeZzYy]?.

If no suffix is given, assume bytes.

Enabling pretty printing might cause certain processors and JSON parsers to fail.
Printing the details can be expensive as the values are retrieved from the caller. The details include the source class name, source file name, source method name, and source line number.

ログハンドラー

ログハンドラーは、ログイベントを受信者に送出するロギングコンポーネントです。Quarkus には、consolefilesyslog という数種類のログハンドラーが含まれています。

特集の例では、 com.example をロギング・カテゴリーとして使用しています。

コンソールログハンドラー

コンソールログハンドラーはデフォルトで有効になっており、すべてのログイベントをアプリケーションのコンソール(通常はシステムの stdout )に送ります。

  • グローバル設定の例:

    quarkus.log.console.format=%d{yyyy-MM-dd HH:mm:ss} %-5p [%c] (%t) %s%e%n
  • カテゴリーごとの設定の例:

    quarkus.log.handler.console.my-console-handler.format=%d{yyyy-MM-dd HH:mm:ss} [com.example] %s%e%n
    
    quarkus.log.category."com.example".handlers=my-console-handler
    quarkus.log.category."com.example".use-parent-handlers=false

設定の詳細は、コンソールロギング設定 リファレンスを参照してください。

ファイルログハンドラー

アプリケーションのホスト上のファイルにイベントを記録するには、Quarkus ファイルログハンドラーを使用します。ファイルログハンドラーはデフォルトで無効になっているため、最初に有効にする必要があります。

Quarkus ファイルログハンドラーは、ログファイルのローテーションをサポートします。

ログファイルのローテーションは、指定された数のバックアップファイルを保持しながら、プライマリログファイルを最新の状態かつ管理可能なサイズに保つことで、効率的なログ管理を可能にします。

  • グローバル設定の例:

    quarkus.log.file.enabled=true
    quarkus.log.file.path=application.log
    quarkus.log.file.format=%d{yyyy-MM-dd HH:mm:ss} %-5p [%c] (%t) %s%e%n
  • カテゴリーごとの設定の例:

    quarkus.log.handler.file.my-file-handler.enabled=true
    quarkus.log.handler.file.my-file-handler.path=application.log
    quarkus.log.handler.file.my-file-handler.format=%d{yyyy-MM-dd HH:mm:ss} [com.example] %s%e%n
    
    quarkus.log.category."com.example".handlers=my-file-handler
    quarkus.log.category."com.example".use-parent-handlers=false

設定の詳細は、ファイルログ設定 リファレンスを参照してください。

Syslog ログハンドラー

Quarkus の syslog ハンドラーは、 Syslog プロトコルに従います。このプロトコルは、UNIX ライクなシステムでログメッセージを送信するために使用されます。 このログハンドラーは、RFC 5424 で定義されたプロトコルを使用します。

デフォルトでは、syslogハンドラは無効になっています。 有効にすると、すべてのログイベントを syslog サーバー(通常はアプリケーションのローカル syslog サーバー)に送信します。

  • グローバル設定の例:

    quarkus.log.syslog.enabled=true
    quarkus.log.syslog.app-name=my-application
    quarkus.log.syslog.format=%d{yyyy-MM-dd HH:mm:ss} %-5p [%c] (%t) %s%e%n
  • カテゴリーごとの設定の例:

    quarkus.log.handler.syslog.my-syslog-handler.enabled=true
    quarkus.log.handler.syslog.my-syslog-handler.app-name=my-application
    quarkus.log.handler.syslog.my-syslog-handler.format=%d{yyyy-MM-dd HH:mm:ss} [com.example] %s%e%n
    
    quarkus.log.category."com.example".handlers=my-syslog-handler
    quarkus.log.category."com.example".use-parent-handlers=false

設定の詳細は、システムロギング設定 リファレンスを参照してください。

Socket ログハンドラー

This handler sends logs to a socket. The socket log handler is disabled by default; enable it in your configuration. When enabled, it sends all log events to a socket, such as a Logstash server.

  • グローバル設定の例:

    quarkus.log.socket.enabled=true
    quarkus.log.socket.endpoint=localhost:4560

通常、このハンドラは quarkus-logging-json エクステンションと一緒に使用し、ECS 形式のログを Elasticsearch インスタンスに送信します。 設定例については、 集中ログ管理 ガイドを参照してください。

ログハンドラーに対するロギングフィルタの追加

コンソールハンドラーなどのログハンドラーに フィルター をアタッチできます。フィルターは、ハンドラーが特定のログレコードを記録するかどうかを決定します。

ロギングフィルターの登録方法

  1. java.util.logging.Filter を実装する final クラスを @io.quarkus.logging.LoggingFilter でアノテートし、 name プロパティを設定します:

    An example of writing a filter:
    package com.example;
    
    import io.quarkus.logging.LoggingFilter;
    import java.util.logging.Filter;
    import java.util.logging.LogRecord;
    
    @LoggingFilter(name = "my-filter")
    public final class TestFilter implements Filter {
    
        private final String part;
    
        public TestFilter(@ConfigProperty(name = "my-filter.part") String part) {
            this.part = part;
        }
    
        @Override
        public boolean isLoggable(LogRecord record) {
            return !record.getMessage().contains(part);
        }
    }

    In this example, the filter excludes log records containing specific text from console logs. The specific text to filter on is not hard-coded; instead, it is read from the my-filter.part configuration property.

    An example of Configuring the filter in application.properties:
    my-filter.part=TEST
  2. application.properties にある filter 設定プロパティを使用して、対応するハンドラにフィルタをアタッチします:

    quarkus.log.console.filter=my-filter

ロギング設定の例

以下の例は、Quarkus でロギングを設定する方法を示しています。

Console DEBUG logging except for Quarkus logs (INFO), no color, shortened time, shortened category prefixes
quarkus.log.console.format=%d{HH:mm:ss} %-5p [%c{2.}] (%t) %s%e%n
quarkus.log.console.level=DEBUG
quarkus.console.color=false

quarkus.log.category."io.quarkus".level=INFO

If you add these properties on the command line, ensure the " character is escaped with a backslash. For example, -Dquarkus.log.category.\"io.quarkus\".level=DEBUG.

File TRACE logging configuration
quarkus.log.file.enabled=true
# Send output to a trace.log file under the /tmp directory
quarkus.log.file.path=/tmp/trace.log
quarkus.log.file.level=TRACE
quarkus.log.file.format=%d{HH:mm:ss} %-5p [%c{2.}] (%t) %s%e%n
# Set 2 categories (io.quarkus.smallrye.jwt, io.undertow.request.security) to TRACE level
quarkus.log.min-level=TRACE
quarkus.log.category."io.quarkus.smallrye.jwt".level=TRACE
quarkus.log.category."io.undertow.request.security".level=TRACE
Because this example does not change the root logger, the console log contains only INFO or higher level logs.
Named handlers attached to a category
# Send output to a trace.log file under the /tmp directory
quarkus.log.file.path=/tmp/trace.log
quarkus.log.console.format=%d{HH:mm:ss} %-5p [%c{2.}] (%t) %s%e%n
# Configure a named handler that logs to console
quarkus.log.handler.console."STRUCTURED_LOGGING".format=%e%n
# Configure a named handler that logs to file
quarkus.log.handler.file."STRUCTURED_LOGGING_FILE".enabled=true
quarkus.log.handler.file."STRUCTURED_LOGGING_FILE".format=%e%n
# Configure the category and link the two named handlers to it
quarkus.log.category."io.quarkus.category".level=INFO
quarkus.log.category."io.quarkus.category".handlers=STRUCTURED_LOGGING,STRUCTURED_LOGGING_FILE
Named handlers attached to the root logger
# configure a named file handler that sends the output to 'quarkus.log'
quarkus.log.handler.file.CONSOLE_MIRROR.enabled=true
quarkus.log.handler.file.CONSOLE_MIRROR.path=quarkus.log
# attach the handler to the root logger
quarkus.log.handlers=CONSOLE_MIRROR

ログの一元管理

一元化された場所を使用して、さまざまなコンポーネントやアプリケーションインスタンスからのログデータを効率的に収集、保存、分析します。

Graylog、Logstash、Fluentdなどの集中型ツールにログを送信するには、Quarkusの 集中型ログ管理 ガイドを参照してください。

OpenTelemetry ログ

すべてのアペンダーから OpenTelemetry Logging へのログエントリ送信を有効にできます。

詳細は、Quarkus OpenTelemetry Logging ガイドを参照してください。

Configure logging for @QuarkusTest

@QuarkusTest でロギングを有効にするには、起動プロセスの早い段階で java.util.logging.manager システムプロパティーを org.jboss.logmanager.LogManager に設定する必要があります。そうしないと、ロギングが期待通りに動作しません。

ビルドツールで次のように設定します。

  • Maven の場合。

    Maven Surefire プラグインの設定でプロパティーを設定します。

    Setting java.util.logging.manager in the Maven Surefire plugin configuration:
    <build>
      <plugins>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${surefire-plugin.version}</version>
          <configuration>
            <systemPropertyVariables>
              <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager> (1)
              <quarkus.log.level>DEBUG</quarkus.log.level> (2)
              <maven.home>${maven.home}</maven.home>
            </systemPropertyVariables>
          </configuration>
        </plugin>
      </plugins>
    </build>
    1 org.jboss.logmanager.LogManager が使用されていることを確認してください。
    2 すべてのロギングカテゴリのデバッグロギングを有効にします。
  • Gradleの場合:

    build.gradle ファイルでプロパティーを設定します。

    test {
        systemProperty "java.util.logging.manager", "org.jboss.logmanager.LogManager"
    }

詳細については、「アプリケーションのテスト」ガイドの IDE からの @QuarkusTest の実行 セクションを参照してください。

他のロギングAPIの使用

Quarkus はロギングを JBoss Logging ライブラリーに依存しています。依存関係が Apache Commons Logging、Log4j、SLF4J などの他のロギング API を使用している場合は、それらのライブラリーを除外し、JBoss Logging アダプターを使用してください。ネイティブビルドが以下のようなエラーで失敗する可能性があるため、この手順はネイティブ実行可能ファイルにとって特に重要です。

Caused by java.lang.ClassNotFoundException: org.apache.commons.logging.impl.LogFactoryImpl

ネイティブ実行可能ファイルには、それらの API 用のロギング実装が含まれていません。この問題を解決するには、JBoss Logging アダプターを使用してください。

次のセクションでは、一般的なオープンソースロギング API 用のアダプターについて説明します。

アプリケーションにロギングアダプタを追加

JBoss Logging 以外のロギング API ごとにロギングアダプターライブラリーを追加して、それらの API を介して記録されたメッセージが JBoss Log Manager バックエンドにルーティングされるようにします。その後、追加されたライブラリーによって生成されたログが、他の Quarkus ログと同じフォーマットに従っているか確認できます。

This step is unnecessary for libraries that are dependencies of a Quarkus extension where the extension handles it automatically.

SLF4J

SLF4J アダプターは、以下の依存関係によって提供されます。

pom.xml
<dependency>
    <groupId>org.jboss.slf4j</groupId>
    <artifactId>slf4j-jboss-logmanager</artifactId>
</dependency>
build.gradle
implementation("org.jboss.slf4j:slf4j-jboss-logmanager")

Apache Commons Logging

Commons Logging アダプターは、以下の依存関係によって提供されます。

pom.xml
<dependency>
    <groupId>org.jboss.logging</groupId>
    <artifactId>commons-logging-jboss-logging</artifactId>
</dependency>
build.gradle
implementation("org.jboss.logging:commons-logging-jboss-logging")

Log4j 2

Log4j 2 アダプターは、以下の依存関係によって提供されます。

pom.xml
<dependency>
    <groupId>org.jboss.logmanager</groupId>
    <artifactId>log4j2-jboss-logmanager</artifactId>
</dependency>
build.gradle
implementation("org.jboss.logmanager:log4j2-jboss-logmanager")

log4j2-jboss-logmanager ライブラリーには、Log4j をロギング実装として使用するために必要なものがすべて含まれているため、Log4j の依存関係を含めないでください。

Log4j

Log4j 1.x は Quarkus でサポートされなくなりました。

MDCを使用してコンテキストログ情報を追加

Quarkus は、リアクティブコアとの互換性を高めるために、ロギングの Mapped Diagnostic Context (MDC) をオーバーライドします。

MDCデータの追加と読込

MDCにデータを追加し、ログ出力に抽出するには以下のように行います:

  1. MDC クラスを使ってデータをセットします。

    1. import org.jboss.logmanager.MDC; を追加します。

    2. 以下の例に示すように、 MDC.put(…​) を設定します。

      An example with JBoss Logging and io.quarkus.logging.Log
      package me.sample;
      
      import io.quarkus.logging.Log;
      import jakarta.ws.rs.GET;
      import jakarta.ws.rs.Path;
      import org.jboss.logmanager.MDC;
      
      import java.util.UUID;
      
      @Path("/hello/jboss")
      public class GreetingResourceJbossLogging {
      
          @GET
          @Path("/test")
          public String greeting() {
              MDC.put("request.id", UUID.randomUUID().toString());
              MDC.put("request.path", "/hello/test");
              Log.info("request received");
              return "hello world!";
          }
      }
  2. ログ形式を %X {mdc-key} を使用するように設定します。

    quarkus.log.console.format=%d{HH:mm:ss} %-5p request.id=%X{request.id} request.path=%X{request.path} [%c{2.}] (%t) %s%n

    結果のメッセージには MDC データが含まれます。

    08:48:13 INFO request.id=c37a3a36-b7f6-4492-83a1-de41dbc26fe2 request.path=/hello/test [me.sa.GreetingResourceJbossLogging] (executor-thread-1) request received

MDCとサポートされるロギングAPI

ロギング API に応じて、次のいずれかの MDC クラスを使用します。

  • Log4j 1 - org.apache.log4j.MDC.put(key, value)

  • Log4j 2 - org.apache.logging.log4j.ThreadContext.put(key, value)

  • SLF4J - org.slf4j.MDC.put(key, value)

MDCの伝播

Quarkusでは、MDCプロバイダにはリアクティブコンテキストを処理するための特別な実装があり、リアクティブ処理や非同期処理中にMDCデータが確実に伝搬されます。

その結果、さまざまなシナリオでMDCデータにアクセスすることができます:

  • 非同期呼び出しの後、例えばRESTクライアントがUniを返す場合:

  • org.eclipse.microprofile.context.ManagedExecutor に送信されたコードで:

  • vertx.executeBlocking() で実行されるコードで:

If applicable, Quarkus stores MDC data in a Vert.x duplicated context, which isolates processing for a single task or request.

ロギング設定リファレンス

ビルド時に固定される設定プロパティ - 他のすべての設定プロパティは、実行時にオーバーライド可能

Configuration property

タイプ

デフォルト

If enabled and a metrics extension is present, logging metrics are published.

Environment variable: QUARKUS_LOG_METRICS_ENABLED

Show more

boolean

false

The default minimum log level.

Environment variable: QUARKUS_LOG_MIN_LEVEL

Show more

Level

DEBUG

This will decorate the stacktrace in dev mode to show the line in the code that cause the exception

Environment variable: QUARKUS_LOG_DECORATE_STACKTRACES

Show more

boolean

true

The log level of the root category, which is used as the default log level for all categories.

JBoss Logging supports Apache-style log levels:

  • org.jboss.logmanager.Level#FATAL

  • org.jboss.logmanager.Level#ERROR

  • org.jboss.logmanager.Level#WARN

  • org.jboss.logmanager.Level#INFO

  • org.jboss.logmanager.Level#DEBUG

  • org.jboss.logmanager.Level#TRACE

In addition, it also supports the standard JDK log levels.

Environment variable: QUARKUS_LOG_LEVEL

Show more

Level

INFO

The names of additional handlers to link to the root category. These handlers are defined in consoleHandlers, fileHandlers, or syslogHandlers.

Environment variable: QUARKUS_LOG_HANDLERS

Show more

文字列のリスト

Minimum logging categories

タイプ

デフォルト

The minimum log level for this category. By default, all categories are configured with DEBUG minimum level.

To get runtime logging below DEBUG, e.g., TRACE, adjust the minimum level at build time. The right log level needs to be provided at runtime.

As an example, to get TRACE logging, minimum level needs to be at TRACE, and the runtime log level needs to match that.

Environment variable: QUARKUS_LOG_CATEGORY__CATEGORIES__MIN_LEVEL

Show more

InheritableLevel

inherit

The log level for this category.

Note that to get log levels below INFO, the minimum level build-time configuration option also needs to be adjusted.

Environment variable: QUARKUS_LOG_CATEGORY__CATEGORIES__LEVEL

Show more

InheritableLevel

inherit

The names of the handlers to link to this category.

Environment variable: QUARKUS_LOG_CATEGORY__CATEGORIES__HANDLERS

Show more

文字列のリスト

Specify whether this logger should send its output to its parent Logger

Environment variable: QUARKUS_LOG_CATEGORY__CATEGORIES__USE_PARENT_HANDLERS

Show more

boolean

true

Console logging

タイプ

デフォルト

If console logging should be enabled

Environment variable: QUARKUS_LOG_CONSOLE_ENABLED

Show more

boolean

true

If console logging should go to System#err instead of System#out.

Environment variable: QUARKUS_LOG_CONSOLE_STDERR

Show more

boolean

false

The log format. Note that this value is ignored if an extension is present that takes control of console formatting (e.g., an XML or JSON-format extension).

Environment variable: QUARKUS_LOG_CONSOLE_FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n

The console log level.

Environment variable: QUARKUS_LOG_CONSOLE_LEVEL

Show more

Level

ALL

Specify how much the colors should be darkened. Note that this value is ignored if an extension is present that takes control of console formatting (e.g., an XML or JSON-format extension).

Environment variable: QUARKUS_LOG_CONSOLE_DARKEN

Show more

int

0

The name of the filter to link to the console handler.

Environment variable: QUARKUS_LOG_CONSOLE_FILTER

Show more

string

Whether to log asynchronously

Environment variable: QUARKUS_LOG_CONSOLE_ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_CONSOLE_ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_CONSOLE_ASYNC_OVERFLOW

Show more

block, discard

block

File logging

タイプ

デフォルト

If file logging should be enabled

Environment variable: QUARKUS_LOG_FILE_ENABLED

Show more

boolean

false

The log format

Environment variable: QUARKUS_LOG_FILE_FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %h %N[%i] %-5p [%c{3.}] (%t) %s%e%n

The level of logs to be written into the file.

Environment variable: QUARKUS_LOG_FILE_LEVEL

Show more

Level

ALL

The name of the file in which logs will be written.

Environment variable: QUARKUS_LOG_FILE_PATH

Show more

File

quarkus.log

The name of the filter to link to the file handler.

Environment variable: QUARKUS_LOG_FILE_FILTER

Show more

string

The character encoding used

Environment variable: QUARKUS_LOG_FILE_ENCODING

Show more

Charset

Whether to log asynchronously

Environment variable: QUARKUS_LOG_FILE_ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_FILE_ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_FILE_ASYNC_OVERFLOW

Show more

block, discard

block

Whether log rotation is enabled.

Environment variable: QUARKUS_LOG_FILE_ROTATION_ENABLED

Show more

boolean

true

The maximum log file size, after which a rotation is executed, up to Long.MAX_VALUE bytes. Note that the file is rotated after the log record is written. Thus, this isn’t a hard maximum on the file size; rather, it’s a hard minimum on the size of the file before it is rotated.

Environment variable: QUARKUS_LOG_FILE_ROTATION_MAX_FILE_SIZE

Show more

MemorySize 

10M

The maximum number of backups to keep.

Environment variable: QUARKUS_LOG_FILE_ROTATION_MAX_BACKUP_INDEX

Show more

int

5

The file handler rotation file suffix. When used, the file will be rotated based on its suffix.

The suffix must be in a date-time format that is understood by DateTimeFormatter.

Example fileSuffix: .yyyy-MM-dd

Note: If the suffix ends with .zip or .gz, the rotation file will also be compressed.

Environment variable: QUARKUS_LOG_FILE_ROTATION_FILE_SUFFIX

Show more

string

Indicates whether to rotate log files on server initialization.

You need to either set a max-file-size or configure a file-suffix for it to work.

Environment variable: QUARKUS_LOG_FILE_ROTATION_ROTATE_ON_BOOT

Show more

boolean

true

Syslog logging

タイプ

デフォルト

If syslog logging should be enabled

Environment variable: QUARKUS_LOG_SYSLOG_ENABLED

Show more

boolean

false

The IP address and port of the Syslog server

Environment variable: QUARKUS_LOG_SYSLOG_ENDPOINT

Show more

host:port

localhost:514

The app name used when formatting the message in RFC5424 format

Environment variable: QUARKUS_LOG_SYSLOG_APP_NAME

Show more

string

The name of the host the messages are being sent from

Environment variable: QUARKUS_LOG_SYSLOG_HOSTNAME

Show more

string

Sets the facility used when calculating the priority of the message as defined by RFC-5424 and RFC-3164

Environment variable: QUARKUS_LOG_SYSLOG_FACILITY

Show more

kernel, user-level, mail-system, system-daemons, security, syslogd, line-printer, network-news, uucp, clock-daemon, security2, ftp-daemon, ntp, log-audit, log-alert, clock-daemon2, local-use-0, local-use-1, local-use-2, local-use-3, local-use-4, local-use-5, local-use-6, local-use-7

user-level

Set the SyslogType syslog type this handler should use to format the message sent

Environment variable: QUARKUS_LOG_SYSLOG_SYSLOG_TYPE

Show more

rfc5424, rfc3164

rfc5424

Sets the protocol used to connect to the Syslog server

Environment variable: QUARKUS_LOG_SYSLOG_PROTOCOL

Show more

tcp, udp, ssl-tcp

tcp

If enabled, the message being sent is prefixed with the size of the message

Environment variable: QUARKUS_LOG_SYSLOG_USE_COUNTING_FRAMING

Show more

true, false, protocol-dependent

protocol-dependent

Set to true to truncate the message if it exceeds maximum length

Environment variable: QUARKUS_LOG_SYSLOG_TRUNCATE

Show more

boolean

true

Enables or disables blocking when attempting to reconnect a Protocol#TCP TCP or Protocol#SSL_TCP SSL TCP protocol

Environment variable: QUARKUS_LOG_SYSLOG_BLOCK_ON_RECONNECT

Show more

boolean

false

The log message format

Environment variable: QUARKUS_LOG_SYSLOG_FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n

The log level specifying what message levels will be logged by the Syslog logger

Environment variable: QUARKUS_LOG_SYSLOG_LEVEL

Show more

Level

ALL

The name of the filter to link to the file handler.

Environment variable: QUARKUS_LOG_SYSLOG_FILTER

Show more

string

The maximum length, in bytes, of the message allowed to be sent, up to Integer.MAX_VALUE bytes. The length includes the header and the message.

If not set, the default value is 2048 when sys-log-type is rfc5424 (which is the default) and 1024 when sys-log-type is rfc3164

Environment variable: QUARKUS_LOG_SYSLOG_MAX_LENGTH

Show more

MemorySize 

Whether to log asynchronously

Environment variable: QUARKUS_LOG_SYSLOG_ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_SYSLOG_ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_SYSLOG_ASYNC_OVERFLOW

Show more

block, discard

block

Socket logging

タイプ

デフォルト

If socket logging should be enabled

Environment variable: QUARKUS_LOG_SOCKET_ENABLED

Show more

boolean

false

The IP address and port of the server receiving the logs

Environment variable: QUARKUS_LOG_SOCKET_ENDPOINT

Show more

host:port

localhost:4560

Sets the protocol used to connect to the syslog server

Environment variable: QUARKUS_LOG_SOCKET_PROTOCOL

Show more

tcp, udp, ssl-tcp

tcp

Enables or disables blocking when attempting to reconnect a Protocol#TCP TCP or Protocol#SSL_TCP SSL TCP protocol

Environment variable: QUARKUS_LOG_SOCKET_BLOCK_ON_RECONNECT

Show more

boolean

false

The log message format

Environment variable: QUARKUS_LOG_SOCKET_FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n

The log level specifying, which message levels will be logged by socket logger

Environment variable: QUARKUS_LOG_SOCKET_LEVEL

Show more

Level

ALL

The name of the filter to link to the file handler.

Environment variable: QUARKUS_LOG_SOCKET_FILTER

Show more

string

Whether to log asynchronously

Environment variable: QUARKUS_LOG_SOCKET_ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_SOCKET_ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_SOCKET_ASYNC_OVERFLOW

Show more

block, discard

block

Console handlers

タイプ

デフォルト

If console logging should be enabled

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__CONSOLE_HANDLERS__ENABLED

Show more

boolean

true

If console logging should go to System#err instead of System#out.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__CONSOLE_HANDLERS__STDERR

Show more

boolean

false

The log format. Note that this value is ignored if an extension is present that takes control of console formatting (e.g., an XML or JSON-format extension).

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__CONSOLE_HANDLERS__FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n

The console log level.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__CONSOLE_HANDLERS__LEVEL

Show more

Level

ALL

Specify how much the colors should be darkened. Note that this value is ignored if an extension is present that takes control of console formatting (e.g., an XML or JSON-format extension).

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__CONSOLE_HANDLERS__DARKEN

Show more

int

0

The name of the filter to link to the console handler.

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__CONSOLE_HANDLERS__FILTER

Show more

string

Whether to log asynchronously

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__CONSOLE_HANDLERS__ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__CONSOLE_HANDLERS__ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_HANDLER_CONSOLE__CONSOLE_HANDLERS__ASYNC_OVERFLOW

Show more

block, discard

block

File handlers

タイプ

デフォルト

If file logging should be enabled

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ENABLED

Show more

boolean

false

The log format

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %h %N[%i] %-5p [%c{3.}] (%t) %s%e%n

The level of logs to be written into the file.

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__LEVEL

Show more

Level

ALL

The name of the file in which logs will be written.

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__PATH

Show more

File

quarkus.log

The name of the filter to link to the file handler.

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__FILTER

Show more

string

The character encoding used

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ENCODING

Show more

Charset

Whether to log asynchronously

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ASYNC_OVERFLOW

Show more

block, discard

block

Whether log rotation is enabled.

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ROTATION_ENABLED

Show more

boolean

true

The maximum log file size, after which a rotation is executed, up to Long.MAX_VALUE bytes. Note that the file is rotated after the log record is written. Thus, this isn’t a hard maximum on the file size; rather, it’s a hard minimum on the size of the file before it is rotated.

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ROTATION_MAX_FILE_SIZE

Show more

MemorySize 

10M

The maximum number of backups to keep.

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ROTATION_MAX_BACKUP_INDEX

Show more

int

5

The file handler rotation file suffix. When used, the file will be rotated based on its suffix.

The suffix must be in a date-time format that is understood by DateTimeFormatter.

Example fileSuffix: .yyyy-MM-dd

Note: If the suffix ends with .zip or .gz, the rotation file will also be compressed.

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ROTATION_FILE_SUFFIX

Show more

string

Indicates whether to rotate log files on server initialization.

You need to either set a max-file-size or configure a file-suffix for it to work.

Environment variable: QUARKUS_LOG_HANDLER_FILE__FILE_HANDLERS__ROTATION_ROTATE_ON_BOOT

Show more

boolean

true

Syslog handlers

タイプ

デフォルト

If syslog logging should be enabled

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__ENABLED

Show more

boolean

false

The IP address and port of the Syslog server

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__ENDPOINT

Show more

host:port

localhost:514

The app name used when formatting the message in RFC5424 format

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__APP_NAME

Show more

string

The name of the host the messages are being sent from

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__HOSTNAME

Show more

string

Sets the facility used when calculating the priority of the message as defined by RFC-5424 and RFC-3164

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__FACILITY

Show more

kernel, user-level, mail-system, system-daemons, security, syslogd, line-printer, network-news, uucp, clock-daemon, security2, ftp-daemon, ntp, log-audit, log-alert, clock-daemon2, local-use-0, local-use-1, local-use-2, local-use-3, local-use-4, local-use-5, local-use-6, local-use-7

user-level

Set the SyslogType syslog type this handler should use to format the message sent

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__SYSLOG_TYPE

Show more

rfc5424, rfc3164

rfc5424

Sets the protocol used to connect to the Syslog server

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__PROTOCOL

Show more

tcp, udp, ssl-tcp

tcp

If enabled, the message being sent is prefixed with the size of the message

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__USE_COUNTING_FRAMING

Show more

true, false, protocol-dependent

protocol-dependent

Set to true to truncate the message if it exceeds maximum length

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__TRUNCATE

Show more

boolean

true

Enables or disables blocking when attempting to reconnect a Protocol#TCP TCP or Protocol#SSL_TCP SSL TCP protocol

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__BLOCK_ON_RECONNECT

Show more

boolean

false

The log message format

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n

The log level specifying what message levels will be logged by the Syslog logger

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__LEVEL

Show more

Level

ALL

The name of the filter to link to the file handler.

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__FILTER

Show more

string

The maximum length, in bytes, of the message allowed to be sent, up to Integer.MAX_VALUE bytes. The length includes the header and the message.

If not set, the default value is 2048 when sys-log-type is rfc5424 (which is the default) and 1024 when sys-log-type is rfc3164

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__MAX_LENGTH

Show more

MemorySize 

Whether to log asynchronously

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_HANDLER_SYSLOG__SYSLOG_HANDLERS__ASYNC_OVERFLOW

Show more

block, discard

block

Socket handlers

タイプ

デフォルト

If socket logging should be enabled

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__ENABLED

Show more

boolean

false

The IP address and port of the server receiving the logs

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__ENDPOINT

Show more

host:port

localhost:4560

Sets the protocol used to connect to the syslog server

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__PROTOCOL

Show more

tcp, udp, ssl-tcp

tcp

Enables or disables blocking when attempting to reconnect a Protocol#TCP TCP or Protocol#SSL_TCP SSL TCP protocol

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__BLOCK_ON_RECONNECT

Show more

boolean

false

The log message format

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__FORMAT

Show more

string

%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n

The log level specifying, which message levels will be logged by socket logger

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__LEVEL

Show more

Level

ALL

The name of the filter to link to the file handler.

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__FILTER

Show more

string

Whether to log asynchronously

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__ASYNC_ENABLED

Show more

boolean

false

The queue length to use before flushing writing

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__ASYNC_QUEUE_LENGTH

Show more

int

512

Determine whether to block the publisher (rather than drop the message) when the queue is full

Environment variable: QUARKUS_LOG_HANDLER_SOCKET__SOCKET_HANDLERS__ASYNC_OVERFLOW

Show more

block, discard

block

Log cleanup filters - internal use

タイプ

デフォルト

The message prefix to match

Environment variable: QUARKUS_LOG_FILTER__FILTERS__IF_STARTS_WITH

Show more

文字列のリスト

inherit

The new log level for the filtered message. Defaults to DEBUG.

Environment variable: QUARKUS_LOG_FILTER__FILTERS__TARGET_LEVEL

Show more

Level

DEBUG

MemorySizeフォーマットについて

A size configuration option recognizes strings in this format (shown as a regular expression): [0-9]+[KkMmGgTtPpEeZzYy]?.

If no suffix is given, assume bytes.


1. デフォルトでは設定されたカテゴリはルートロガーにアタッチされたハンドラーと同じものを受け取ります。
2. 呼び出し元情報を調べるフォーマットシーケンスはパフォーマンスに影響する可能性があります