log4j2.properties

このセクションでは、Log4j2.properties ファイルのアーキテクチャーについて説明します。このファイルは、アプリケーションからの出力とメッセージのロギングのセットアップと構成に使用されます。

詳しくは、以下の 2 つのページを参照してください。

appenders =
変更可能フィールド アペンダー
フィールドの説明 アペンダーの名前を定義します。
有効な値 ユーザー定義例 - A1, Rolling
値の定義
rootLogger.level =
変更可能フィールド rootLogger.level
フィールドの説明 ロガーのレベルを定義します。
有効な値 ロガーには WARN のレベルがあります。
値の定義

さまざまなロガーのレベル (FATAL、ERROR、 WARN、INFO、DEBUG、TRACE、ALL) があります。

詳しくは、https://logging.apache.org/log4j/2.x/manual/index.html を参照してください。

rootLogger.appenderRefs = 
変更可能フィールド rootLogger.appenderRefs
フィールドの説明 呼び出すアペンダーの名前。
有効な値 ユーザー定義例 - stdout
値の定義
rootLogger.appenderRef.stdout.ref = 
変更可能フィールド rootLogger.appenderRef.stdout.ref
フィールドの説明 呼び出すアペンダー・タイプの名前。
有効な値 ユーザー定義例 - STDOUT
値の定義
appender.A1.type =
変更可能フィールド appender.A1.type
フィールドの説明 アペンダー A1 がフォーマット済みメッセージの送信先にする出力宛先を定義します。
有効な値 ユーザー定義。例えば、メッセージをコンソールからコンソールへ送信します。
値の定義
appender.A1.name =
変更可能フィールド appender.A1.name
フィールドの説明 アペンダーの名前を定義します。
有効な値 ユーザー定義例 - STDOUT
値の定義
appender.A1.layout.type =
変更可能フィールド appender.A1.layout.type
フィールドの説明 ログ・メッセージの出力フォーマットを指定するために使用されます。
有効な値 ユーザー定義例 - PatternLayout
値の定義
appender.A1.layout.charset =
変更可能フィールド appender.A1.layout.charset
フィールドの説明 メッセージ出力に使用されるエンコード・タイプ
有効な値 ユーザー定義 - 例えば、UTF8
値の定義
appender.A1.layout.pattern =
変更可能フィールド appender.A1.layout.pattern
フィールドの説明 ログ・メッセージの出力のフォーマット設定に使用されるパターンを定義します。
有効な値 ユーザー定義
値の定義

https://logging.apache.org/log4j/2.x/log4j-core/apidocs/org/apache/logging/log4j/core/layout/PatternLayout.html」を参照してください。

appender.Rolling.type =
変更可能フィールド appender.Rolling.type
フィールドの説明 アペンダー Rolling によるフォーマット済みメッセージの送信先となる出力宛先を定義します。
有効な値 ユーザー定義例 - RollingFileAppender
値の定義
appender.Rolling.name =
変更可能フィールド appender.Rolling.name
フィールドの説明 アペンダー Rolling の名前
有効な値 ユーザー定義
値の定義
appender.Rolling.fileName =
変更可能フィールド appender.Rolling.fileName
フィールドの説明 メッセージをログとして記録するファイルの名前。
有効な値 ユーザー定義 - 例えば、trc.log
値の定義
appender.Rolling.layout.type =
変更可能フィールド appender.Rolling.layout.type
フィールドの説明 ログ・メッセージの出力フォーマットを指定するために使用されます。
有効な値 ユーザー定義例: PatternLayout
値の定義
appender.Rolling.layout.charset =
変更可能フィールド appender.Rolling.layout.charset
フィールドの説明 メッセージ出力に使用されるエンコード・タイプ
有効な値 ユーザー定義例 - UTF-8
値の定義
appender.Rolling.layout.pattern =
変更可能フィールド appender.Rolling.layout.pattern
フィールドの説明 ログ・メッセージの出力のフォーマット設定に使用されるパターンを定義します。
有効な値 ユーザー定義
値の定義
appender.Rolling.policies.type =
変更可能フィールド appender.Rolling.policies.type
フィールドの説明 アペンダーのポリシーを定義します。
有効な値 ユーザー定義
値の定義
appender.Rolling.policies.size.type =
変更可能フィールド appender.Rolling.policies.size.type
フィールドの説明 ロールオーバーを実行する必要があるかどうかを判断するために使用するポリシー。
有効な値 ユーザー定義例 - SizeBasedTriggeringPolicy
値の定義
appender.Rolling.policies.size.size =
変更可能フィールド appender.Rolling.policies.size.size
フィールドの説明 ロールオーバーをトリガーするファイル・サイズ。
有効な値 ユーザー定義
値の定義
appender.Rolling.strategy.type =
変更可能フィールド appender.Rolling.strategy.type
フィールドの説明 アーカイブ・ファイルの名前と場所を決定するために使用する方法。
有効な値 ユーザー定義例 - DefaultRolloverStrategy
値の定義
appender.Rolling.strategy.max =
変更可能フィールド appender.Rolling.strategy.max
フィールドの説明 保持するバックアップ・ログ・ファイルの数を定義します。
有効な値 ユーザー定義例 - 4
値の定義
loggers =
変更可能フィールド loggers
フィールドの説明 ロガーを定義します。
有効な値 ユーザー定義例 - rolling
値の定義
logger.rolling.name =
変更可能フィールド logger.rolling.name
フィールドの説明 ロガーの名前。
有効な値 ユーザー定義例 - com.bigfix
値の定義
logger.rolling.level =
変更可能フィールド logger.rolling.level
フィールドの説明 出力するロギング情報のレベルを定義します。
有効な値
  • TRACE
  • DEBUG
  • INFO
  • WARN
  • ERROR
  • FATAL
  • OFF
値の定義
上記の値は、ログに記録するデータ量の順に示されています。どの値が設定されても、そのレベル以上の情報がログに記録されます。例えばこの値を DEBUG に設定すると、デバッグ・メッセージから致命的メッセージまでの情報がログに記録されます。値 WARN を設定すると、警告情報から致命的情報までがログに記録されます。
注: このプロパティーの値を変更し、「送信」をクリックしてファイルを保存した後で、BigFix® Remote Control サーバー・サービスを再起動する必要があります。
logger.rolling.appenderRef =
変更可能フィールド logger.rolling.appenderRef
フィールドの説明 呼び出すアペンダーの名前。
有効な値 ユーザー定義例 - Rolling
値の定義

logger.rolling.appenderRef.Rolling.ref =
変更可能フィールド logger.rolling.appenderRef.Rolling.ref
フィールドの説明 呼び出すアペンダー・タイプの名前。
有効な値 ユーザー定義例 - LOGFILE
値の定義