ロギングの設定
このガイドでは、ロギングとその設定方法について説明します。
内部的には、QuarkusはJBoss Log ManagerとJBoss Logging ファサードを使用します。 JBoss Logging ファサードはすでに提供されているので、コード内部で使用することができますが、QuarkusがJBoss Log Managerに送信するため、次の章でリストアップされているサポートされたロギングAPIのいずれかを使用することもできます。
すべてのロギング設定は、 application.properties
の中で実施されます。
サポートされているロギング API
アプリケーションやコンポーネントは、以下のいずれかのAPIを使用してログを出力することができ、ログはマージされます。
-
JDK
java.util.logging
(JUL とも呼ばれます)
Quarkusは内部的にJBoss Loggingを使用しています。アプリケーションの内部で使用することもできるので、ログに他の依存関係を追加する必要はありません。
import org.jboss.logging.Logger;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.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";
}
}
JBoss Logging を使用しているけれども、ライブラリの 1 つが異なるロギング API を使用している場合は、 ロギングアダプター を設定する必要がある場合があります。 |
Logging with Panache
Logger
フィールドを宣言する代わりに、簡略化されたロギング API を使用することができます。
package com.example;
import io.quarkus.logging.Log; (1)
class MyService { (2)
public void doSomething() {
Log.info("Simple!"); (3)
}
}
1 | io.quarkus.logging.Log クラスは、すべてのメソッドが static であることを除き、JBoss Logging API をミラーリングします。 |
2 | なお、このクラスではloggerフィールドを宣言していません。これは、アプリケーションのビルド時に、 Log API を使用する各クラスに private static final org.jboss.logging.Logger フィールドが自動的に作成されるためです。 Log メソッドを呼び出したクラスの完全修飾名がロガー名として使用されます。この例では、ロガー名は com.example.MyService となります。 |
3 | 最後に、アプリケーションのビルド時に、 Log メソッドへのすべての呼び出しが、logger フィールド上の通常の JBoss Logging 呼び出しに書き換えられます。 |
Log APIはアプリケーションクラスでのみ使用し、外部の依存関係では使用しないでください。ビルド時にQuarkusによって処理されていない Log メソッド呼び出しは、例外が発生します。
|
Loggerの挿入
また、設定済みの org.jboss.logging.Logger
インスタンスを Bean やリソースクラスに注入することもできます。
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) 宣言したクラスのFQCNがロガー名として使用されます。 |
2 | org.jboss.logging.Logger.getLogger("foo") この場合、ロガー名として foo という名前が使われます。 |
ロガーインスタンスは内部的にキャッシュされます。したがって、例えば @RequestScoped Bean に注入されたロガーは、ロガーのインスタンス化に関連する可能性のあるパフォーマンスのペナルティを回避するために、すべての Bean インスタンスで共有されます。
|
Apache Log4j はどうですか?
Log4j はロギングの実装の一つです: ロギングバックエンドとロギングファサードが含まれています。QuarkusはJBoss Log Managerバックエンドを使用するため、Log4jログをJBoss Log Managerにルーティングするためには log4j2-jboss-logmanager
ライブラリをインクルードする必要があります。
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>log4j2-jboss-logmanager</artifactId> (1)
</dependency>
1 | これはLog4Jのバージョン2に必要なライブラリです。もしレガシーなLog4Jのバージョン1を使用している場合は、代わりに log4j-jboss-logmanager を使用する必要があります。 |
implementation("org.jboss.logmanager:log4j2-jboss-logmanager") (1)
1 | これはLog4Jのバージョン2に必要なライブラリです。もしレガシーなLog4Jのバージョン1を使用している場合は、代わりに log4j-jboss-logmanager を使用する必要があります。 |
これで、アプリケーション内でLog4J APIを使用することができます。
Log4jの依存関係を含めないでください。 log4j2-jboss-logmanager ライブラリは、Log4j をロギング・ファサードとして使用するために必要なものを含んでいます。
|
ログレベル
これらはQuarkusで使用されているログレベルです。
OFF |
ロギングをオフにするための特別なレベル |
FATAL |
致命的なサービス障害/いかなる種類のサービス要求にも完全に対応できないこと |
ERROR |
リクエストの大幅な中断、またはリクエストに対応できないこと |
WARN |
重要ではないサービスのエラーや問題で、すぐに修正する必要がない場合があります |
INFO |
サービスのライフサイクルイベントまたは重要な関連する非常に低頻度の情報 |
DEBUG |
デバッグに役立つかもしれない、ライフサイクルまたは非リクエストバウンドイベントに関する余分な情報を伝えるメッセージ |
TRACE |
リクエストごとのデバッグ情報を伝えるメッセージで、非常に高い頻度で送信される可能性があります |
ALL |
カスタムレベルを含むすべてのメッセージのための特別なレベル |
加えて、 java.util.logging
を利用して、アプリケーションとライブラリに対して以下のレベルを設定することができます。
SEVERE |
ERROR と同じ |
WARNING |
WARN と同じ |
CONFIG |
サービス構成情報 |
FINE |
DEBUG と同じ |
FINER |
TRACE と同じ |
FINEST |
イベント |
実行時設定
実行時ロギングは application.properties
ファイルで設定します。例えばデフォルトのログレベルを INFO
ロギングに設定し、Hibernate の DEBUG
ログを含めるようにします。
quarkus.log.level=INFO
quarkus.log.category."org.hibernate".level=DEBUG
ログレベルを DEBUG
より下に設定するには、ログレベル自体を調整するだけでなく、グローバルに quarkus.log.min-level
プロパティーを介して、または上記の例のようにカテゴリごとに、最小ログレベルを調整する必要があります。
最小ロギングレベルは、Quarkusが潜在的に生成するために必要となるフロアレベルを設定し、最適化の機会の扉を開きます。例えば、ネイティブ実行では、最小レベルを設定することで、低レベルのチェック(例: isTraceEnabled
)を false
に折りたたむことができ、結果として、実行されることのないコードのデッドコードを排除することができます。
可能なすべてのプロパティーは、 ロギング設定リファレンス に記載されています。
コマンドラインでこれらのプロパティーを追加する場合は、 " がエスケープされていることを確認してください。例えば -Dquarkus.log.category.\"org.hibernate\".level=TRACE とします。
|
ロギングカテゴリ
ロギングはカテゴリごとに行われます。各カテゴリは独立して設定することができます。あるカテゴリに適用される設定は、より特定の一致するサブカテゴリの設定がない限り、そのカテゴリのすべてのサブカテゴリにも適用されます。すべてのカテゴリに対して、( console / file / syslog ) で設定されているのと同じ設定が適用されます。これらの設定は、1つ以上の名前付きハンドラーをカテゴリにアタッチすることで上書きすることもできます。 category-named-handlers-example] の例を参照してください。
プロパティ名e | デフォルト | 説明 |
---|---|---|
|
|
|
|
|
|
|
|
Specify whether this logger should send its output to its parent logger. |
|
|
特定のカテゴリにアタッチしたいハンドラーの名前です。 |
カテゴリには通常 '.' が含まれているため、プロパティー名に表示されているクオートはエスケープされている必要があります。例を [category-example] に示します。 |
ログフォーマット
デフォルトでは、Quarkusはパターンベースのログフォーマッタを使用して、人間が読めるテキストログを生成します。
各ログハンドラーのフォーマットは、専用のプロパティーで設定することができます。コンソールハンドラーの場合、プロパティーは quarkus.log.console.format
です。
ログフォーマット文字列は、以下のシンボルをサポートしています。
Symbol | 概要 | 説明 |
---|---|---|
|
|
単に |
|
カテゴリ |
カテゴリ名をレンダリングします。 |
|
ソースクラスs |
ソースクラス名をレンダリングします。 [3] |
|
Date |
|
|
Exception |
投げられた例外があれば、その例外をレンダリングします。 |
|
ソースファイルe |
ソースファイル名をレンダリングします。 [3] |
|
ホスト名e |
システムの単純なホスト名をレンダリングします。 |
|
完全修飾ホスト名e |
システムの完全修飾されたホスト名をレンダリングします。OSの設定によっては、単純ホスト名と同じかもしれません。 |
|
プロセスID |
現在のプロセスPIDをレンダリングします。 |
|
ソースの場所 |
ソースファイル名、行番号、クラス名、メソッド名を含むソース・ロケーション情報をレンダリングします。 [3] |
|
ソースラインe |
ソース行番号をレンダリングします。 [3] |
|
フルメッセージe |
ログメッセージと例外(もしあれば)を表示します。 |
|
ソースメソッドd |
ソースメソッド名をレンダリングします。 [3] |
|
改行e |
プラットフォーム固有の改行文字列をレンダリングします。 |
|
プロセス名e |
現在のプロセスの名前をレンダリングします。 |
|
レベルl |
メッセージのログレベルをレンダリングします。 |
|
相対時間e |
アプリケーションログの開始からの時間をミリ秒単位でレンダリングします。 |
|
シンプルメッセージe |
ログメッセージのみを表示し、例外のトレースは表示しません。 |
|
スレッド名e |
スレッド名をレンダリングします。 |
|
スレッドID |
スレッドIDをレンダリングします。 |
|
タイムゾーンe |
出力のタイムゾーンを |
|
マップされた診断コンテキスト値e |
マップされた診断コンテキストの値をレンダリングします。 |
|
マップされた診断コンテキスト値s |
マップされた診断コンテキストのすべての値を {property.key=property.value} 形式でレンダリングします。 |
|
入れ子になった診断コンテキスト値s |
ネストされた診断コンテキストからのすべての値を {value1.value2} 形式でレンダリングします。 |
コンソールログの代替フォーマット
コンソールログの出力形式を変更することができます。これは、Quarkusアプリケーションの出力がサービスによってキャプチャされ、例えば、後で分析するためにログ情報を処理して保存することができる環境で有用です。
JSON ログフォーマット
JSON ログフォーマットを設定するために、 quarkus-logging-json
エクステンションモジュールを使用することができます。次のスニペットが示すように、このエクステンションをアプリケーションPOMに追加してください。
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-logging-json</artifactId>
</dependency>
implementation("io.quarkus:quarkus-logging-json")
このエクステンションが存在すると、デフォルトではコンソール設定からの出力フォーマット設定を置き換えます。つまり、フォーマット文字列と色の設定(もしあれば)は無視されます。他のコンソール設定項目(非同期ロギングやログレベルを制御するものを含む)は引き続き適用されます。
いくつかの場合、開発モードでは人間が読める(構造化されていない)ロギングを使用し、本番モードではJSONロギング(構造化されている)を使用することが理にかなっているでしょう。これは、以下の設定で示されているように、異なるプロファイルを使用して達成することができます。
%dev.quarkus.log.console.json=false
%test.quarkus.log.console.json=false
設定
JSON ロギングエクステンションは、さまざまな方法で設定することができます。以下のプロパティーがサポートされています。
ビルド時に固定される設定プロパティ - それ以外の設定プロパティは実行時に上書き可能
タイプ |
デフォルト |
|
---|---|---|
Determine whether to enable the JSON console formatting extension, which disables "normal" console formatting. Environment variable: |
boolean |
|
Enable "pretty printing" of the JSON record. Note that some JSON parsers will fail to read pretty printed output. Environment variable: |
boolean |
|
The date format to use. The special string "default" indicates that the default format should be used. Environment variable: |
string |
|
The special end-of-record delimiter to be used. By default, newline is used as delimiter. Environment variable: |
string |
|
The zone ID to use. The special string "default" indicates that the default zone should be used. Environment variable: |
string |
|
The exception output type to specify. Environment variable: |
|
|
Enable printing of more details in the log. 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. Environment variable: |
boolean |
|
Override keys with custom values. Omitting this value indicates that no key overrides will be applied. Environment variable: |
string |
|
Keys to be excluded from the Json output. Environment variable: |
list of string |
|
Additional field value. Environment variable: |
string |
required |
Additional field type specification. Supported types: string, int, long String is the default if not specified. Environment variable: |
|
|
タイプ |
デフォルト |
|
Determine whether to enable the JSON console formatting extension, which disables "normal" console formatting. Environment variable: |
boolean |
|
Enable "pretty printing" of the JSON record. Note that some JSON parsers will fail to read pretty printed output. Environment variable: |
boolean |
|
The date format to use. The special string "default" indicates that the default format should be used. Environment variable: |
string |
|
The special end-of-record delimiter to be used. By default, newline is used as delimiter. Environment variable: |
string |
|
The zone ID to use. The special string "default" indicates that the default zone should be used. Environment variable: |
string |
|
The exception output type to specify. Environment variable: |
|
|
Enable printing of more details in the log. 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. Environment variable: |
boolean |
|
Override keys with custom values. Omitting this value indicates that no key overrides will be applied. Environment variable: |
string |
|
Keys to be excluded from the Json output. Environment variable: |
list of string |
|
Additional field value. Environment variable: |
string |
required |
Additional field type specification. Supported types: string, int, long String is the default if not specified. Environment variable: |
|
|
プリティプリントを有効にすると、特定のプロセッサーやJSONパーサーで解釈できなくなる可能性があります。 |
呼び出し元から値を取得するため、詳細を表示するとコストがかかります。詳細には、ソースクラス名、ソースファイル名、ソースメソッド名、ソース行番号が含まれます。 |
ログハンドラー
ログハンドラーは、受信者へのログイベントの送信を担当するロギングコンポーネントです。Quarkusには、 コンソール 、 ファイル 、 syslog という3つの異なるログハンドラーが用意されています。
コンソールログハンドラー
コンソールログハンドラーはデフォルトで有効になっています。これはすべてのログイベントをアプリケーションのコンソールに出力します (通常はシステムの stdout
)。
その設定オプションの詳細については、コンソール ロギング設定リファレンス を参照してください。
ファイルログハンドラー
ファイルログハンドラーはデフォルトでは無効になっています。すべてのログイベントをアプリケーションのホスト上のファイルに出力します。ログファイルのローテーションをサポートしています。
その設定オプションの詳細については、ファイル ロギング設定リファレンス を参照してください。
Syslog ログハンドラー
syslog ハンドラーは、すべてのログイベントを syslog サーバー (デフォルトでは、アプリケーションのローカルにある syslog サーバー) に送信します。デフォルトでは無効になっています。
その設定オプションの詳細については、Syslog Logging設定リファレンス を参照してください。
Although the root logger’s handlers are usually configured directly via |
サンプル
quarkus.log.console.format=%d{HH:mm:ss} %-5p [%c{2.}] (%t) %s%e%n
quarkus.log.console.level=DEBUG
quarkus.log.console.color=false
quarkus.log.category."io.quarkus".level=INFO
コマンドラインでこれらのプロパティーを追加する場合は、 " がエスケープされていることを確認してください。例えば -Dquarkus.log.category.\"io.quarkus\".level=DEBUG のようにします。
|
quarkus.log.file.enable=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
ルートロガーを変更しないので、コンソールログには INFO 以上の順位のログしか表示されません。
|
# 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".enable=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
# configure a named file handler that sends the output to 'quarkus.log'
quarkus.log.handler.file.CONSOLE_MIRROR.enable=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などの集中型ツールに送信したい場合は、 集中型ログ管理ガイド に従ってください。
@QuarkusTest
のログ設定方法
@QuarkusTest
のロギングを設定したい場合は、それに応じて maven-surefire-plugin
を設定することを忘れないでください。特に、 java.util.logging.manager
system プロパティーを使用して適切な LogManager
を設定する必要があります。
<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"
}
ロギングアダプター
Quarkusは、すべてのロギング要件をJBoss Loggingライブラリに依存しています。
Apache Commons Logging、Log4j、Slf4j などの他のロギングライブラリに依存関係があるライブラリを使用している場合は、それらを依存関係から除外し、JBoss Logging が提供するアダプターのいずれかを使用する必要があります。
ネイティブ実行可能ファイルをコンパイルする際に以下のような問題が発生する可能性があるため、ネイティブ実行可能ファイルをビルドする際には特に重要です。
Caused by java.lang.ClassNotFoundException: org.apache.commons.logging.impl.LogFactoryImpl
これは、ロギングの実装がネイティブ実行可能ファイルに含まれていないことが原因です。JBoss Logging アダプターを使用することで、この問題は解決されます。
これらのアダプターは、Apache Commons Logging のような一般的なオープンソースのロギングコンポーネントのほとんどに対して存在します。
Apache Commons Logging:
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>commons-logging-jboss-logging</artifactId>
</dependency>
implementation("org.jboss.logging:commons-logging-jboss-logging")
Log4j:
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>log4j-jboss-logmanager</artifactId>
</dependency>
implementation("org.jboss.logmanager:log4j-jboss-logmanager")
Log4j 2:
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>log4j2-jboss-logmanager</artifactId>
</dependency>
implementation("org.jboss.logmanager:log4j2-jboss-logmanager")
そして Slf4j:
<dependency>
<groupId>org.jboss.slf4j</groupId>
<artifactId>slf4j-jboss-logmanager</artifactId>
</dependency>
implementation("org.jboss.slf4j:slf4j-jboss-logmanager")
これは、Quarkusエクステンションの依存関係にあるライブラリには必要ありません。 |
ロギング設定リファレンス
ビルド時に固定される設定プロパティ - それ以外の設定プロパティは実行時に上書き可能
タイプ |
デフォルト |
|
---|---|---|
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:
In addition, it also supports the standard JDK log levels. Environment variable: |
|
|
The names of additional handlers to link to the root category. These handlers are defined in consoleHandlers, fileHandlers or syslogHandlers. Environment variable: |
list of string |
|
タイプ |
デフォルト |
|
If console logging should be enabled Environment variable: |
boolean |
|
If console logging should go to Environment variable: |
boolean |
|
The log format. Note that this value will be ignored if an extension is present that takes control of console formatting (e.g. an XML or JSON-format extension). Environment variable: |
string |
|
The console log level. Environment variable: |
|
|
Specify how much the colors should be darkened. Note that this value will be ignored if an extension is present that takes control of console formatting (e.g. an XML or JSON-format extension). Environment variable: |
int |
|
Indicates whether to log asynchronously Environment variable: |
boolean |
|
The queue length to use before flushing writing Environment variable: |
int |
|
Determine whether to block the publisher (rather than drop the message) when the queue is full Environment variable: |
|
|
タイプ |
デフォルト |
|
If file logging should be enabled Environment variable: |
boolean |
|
The log format Environment variable: |
string |
|
The level of logs to be written into the file. Environment variable: |
|
|
The name of the file in which logs will be written. Environment variable: |
|
|
Indicates whether to log asynchronously Environment variable: |
boolean |
|
The queue length to use before flushing writing Environment variable: |
int |
|
Determine whether to block the publisher (rather than drop the message) when the queue is full Environment variable: |
|
|
The maximum file size of the log file after which a rotation is executed. Environment variable: |
|
|
The maximum number of backups to keep. Environment variable: |
int |
|
File handler rotation file suffix. When used, the file will be rotated based on its suffix. Example fileSuffix: .yyyy-MM-dd Environment variable: |
string |
|
Indicates whether to rotate log files on server initialization.
You need to either set a Environment variable: |
boolean |
|
タイプ |
デフォルト |
|
If syslog logging should be enabled Environment variable: |
boolean |
|
The IP address and port of the syslog server Environment variable: |
host:port |
|
The app name used when formatting the message in RFC5424 format Environment variable: |
string |
|
The name of the host the messages are being sent from Environment variable: |
string |
|
Sets the facility used when calculating the priority of the message as defined by RFC-5424 and RFC-3164 Environment variable: |
|
|
Set the Environment variable: |
|
|
Sets the protocol used to connect to the syslog server Environment variable: |
|
|
Set to Environment variable: |
boolean |
|
Set to Environment variable: |
boolean |
|
Enables or disables blocking when attempting to reconnect a Environment variable: |
boolean |
|
The log message format Environment variable: |
string |
|
The log level specifying, which message levels will be logged by syslog logger Environment variable: |
|
|
Indicates whether to log asynchronously Environment variable: |
boolean |
|
The queue length to use before flushing writing Environment variable: |
int |
|
Determine whether to block the publisher (rather than drop the message) when the queue is full Environment variable: |
|
|
タイプ |
デフォルト |
|
The log level for this category. Note that to get log levels below Environment variable: |
InheritableLevel |
|
The names of the handlers to link to this category. Environment variable: |
list of string |
|
Specify whether this logger should send its output to its parent Logger Environment variable: |
boolean |
|
タイプ |
デフォルト |
|
If console logging should be enabled Environment variable: |
boolean |
|
If console logging should go to Environment variable: |
boolean |
|
The log format. Note that this value will be ignored if an extension is present that takes control of console formatting (e.g. an XML or JSON-format extension). Environment variable: |
string |
|
The console log level. Environment variable: |
|
|
Specify how much the colors should be darkened. Note that this value will be ignored if an extension is present that takes control of console formatting (e.g. an XML or JSON-format extension). Environment variable: |
int |
|
Indicates whether to log asynchronously Environment variable: |
boolean |
|
The queue length to use before flushing writing Environment variable: |
int |
|
Determine whether to block the publisher (rather than drop the message) when the queue is full Environment variable: |
|
|
タイプ |
デフォルト |
|
If file logging should be enabled Environment variable: |
boolean |
|
The log format Environment variable: |
string |
|
The level of logs to be written into the file. Environment variable: |
|
|
The name of the file in which logs will be written. Environment variable: |
|
|
Indicates whether to log asynchronously Environment variable: |
boolean |
|
The queue length to use before flushing writing Environment variable: |
int |
|
Determine whether to block the publisher (rather than drop the message) when the queue is full Environment variable: |
|
|
The maximum file size of the log file after which a rotation is executed. Environment variable: |
|
|
The maximum number of backups to keep. Environment variable: |
int |
|
File handler rotation file suffix. When used, the file will be rotated based on its suffix. Example fileSuffix: .yyyy-MM-dd Environment variable: |
string |
|
Indicates whether to rotate log files on server initialization.
You need to either set a Environment variable: |
boolean |
|
タイプ |
デフォルト |
|
If syslog logging should be enabled Environment variable: |
boolean |
|
The IP address and port of the syslog server Environment variable: |
host:port |
|
The app name used when formatting the message in RFC5424 format Environment variable: |
string |
|
The name of the host the messages are being sent from Environment variable: |
string |
|
Sets the facility used when calculating the priority of the message as defined by RFC-5424 and RFC-3164 Environment variable: |
|
|
Set the Environment variable: |
|
|
Sets the protocol used to connect to the syslog server Environment variable: |
|
|
Set to Environment variable: |
boolean |
|
Set to Environment variable: |
boolean |
|
Enables or disables blocking when attempting to reconnect a Environment variable: |
boolean |
|
The log message format Environment variable: |
string |
|
The log level specifying, which message levels will be logged by syslog logger Environment variable: |
|
|
Indicates whether to log asynchronously Environment variable: |
boolean |
|
The queue length to use before flushing writing Environment variable: |
int |
|
Determine whether to block the publisher (rather than drop the message) when the queue is full Environment variable: |
|
|
タイプ |
デフォルト |
|
The message starts to match Environment variable: |
list of string |
|
The new log level for the filtered message, defaults to DEBUG Environment variable: |
|
About the MemorySize format
A size configuration option recognises string in this format (shown as a regular expression): |