目的 自分が使いそうな設定のまとめ。 jar ファイル 最低限、以下のファイルが必要。 log4j-api-2.3.jar log4j-core-2.3.jar (2.3 はこれを書いている時点の最新バージョン) 全体 こんな感じで。 ファイル名はlog4j2.xmlとして、クラスパス上に配置。 <?xml version="1.0" encoding="UTF-8"?> <Configuration status="off"> <!-- AppenterやLoggerで使用するプロパティを定義する --> <Properties> <Property name="...">hoge</Property> <Property name="..." value="..." /> </Properties> <!-- ログの出力先と出力フォーマットを設定する --> <Appenders> <