人気の面接質問と回答・オンラインテスト
面接対策、オンラインテスト、チュートリアル、ライブ練習のための学習プラットフォーム

集中型学習パス、模擬テスト、面接向けコンテンツでスキルを伸ばしましょう。

WithoutBook は、分野別の面接質問、オンライン練習テスト、チュートリアル、比較ガイドをひとつのレスポンシブな学習空間にまとめています。

面接準備

模擬試験

ホームページに設定

このページをブックマーク

メールアドレスを登録

Without Book 質問する

質問. log4j.xml or log4j.properties in java log configuration.

- Which one I should prefer - log4j.xml or log4j.properties to configure log in my java app.

投稿日 Jul 23, 2014 投稿者 Ruby Singh
回答. Properties can be defined by a properties file or by an XML file. Log4j looks for a file named log4j.xml and then for a file named log4j.properties. Both must be placed in the src folder.

The property file is less verbose than an XML file. The XML requires the log4j.dtd to be placed in the source folder as well. The XML requires a dom4j.jar which might not be included in older Java versions.

The properties file does not support some advanced configuration options like Filters, custom ErrorHandlers and a special type of appenders, i.e. AsyncAppender. ErrorHandlers defines how errors in log4j itself are handled, for example badly configured appenders. Filters are more interesting. From the available filters, I think that the level range filter is really missing for property files.
投稿日 Jul 26, 2014 投稿者 Johny Verma

回答を入力

名前
メールアドレス
回答
セキュリティチェック
続行するにはこれを解いてください: 8 + 7 = ?
著作権 © 2026、WithoutBook。