7

特定のシステムへのログオンに関する開発者向けのポリシー ドキュメントを作成しています。

私の草稿ドキュメントには、「すべてのロギングは適切なレベルである必要があります...」があり、これはレビューで正しく取り上げられています。まともなレベルとは何ですか?

一般化された、しかし信頼できるガイダンスはありますか?

4

1 に答える 1

8

To reduce the answer to the question of how to choose the right level:

Debug: Messages in this level contain extensive contextual information. They are mostly used for problem diagnosis. Information on this Level are for Developers and not for the Users.

Info: These messages contain some contextual information to help trace execution (at a coarse-grained level) in a production environment.

Warning: A warning message indicates a potential problem in the system. the System is able to handle the problem by themself or to proccede with this problem anyway.

Error: An error message indicates a serious problem in the system. The problem is usually non-recoverable and requires manual intervention.

Both the standard Java Logging API and Apache Log4J provide logging levels beyond these basics. The primary purpose of a logging level is to help you filter useful information out of the noise. To avoid using the wrong level and thus reducing the usefulness of log messages, developers must be given clear guidelines before they start coding.

created on the base of IBM

于 2012-07-24T13:59:13.990 に答える