开发者

Log.INFO vs. Log.DEBUG [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
开发者_运维知识库

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 4 years ago.

The community reviewed whether to reopen this question 6 months ago and left it closed:

Original close reason(s) were not resolved

Improve this question

I am developing a large commercial program and keep confusing myself between what kind of information i want to log with Log.INFO and Log.DEBUG.

Are there any standards or canonical Python Enhancement Proposal / Java standard conventions / rules defined for other languages on what each type of log message contains?


I usually try to use it like this:

  • DEBUG: Information interesting for Developers, when trying to debug a problem.
  • INFO: Information interesting for Support staff trying to figure out the context of a given error
  • WARN to FATAL: Problems and Errors depending on level of damage.


Debug: fine-grained statements concerning program state, typically used for debugging;

Info: informational statements concerning program state, representing program events or behavior tracking;

Warn: statements that describe potentially harmful events or states in the program;

Error: statements that describe non-fatal errors in the application; this level is used quite often for logging handled exceptions;

Fatal: statements representing the most severe of error conditions, assumedly resulting in program termination.

Found on http://www.beefycode.com/post/Log4Net-Tutorial-pt-1-Getting-Started.aspx


Also remember that all info(), error(), and debug() logging calls provide internal documentation within any application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜