开发者

Tips on Application logging

I was going over some tips from javacodegeeks. Was wondering if this article summarizes all the tips and best practices.

http://www.javacodegeeks.com/2011/01/10-tips-proper-application-lo开发者_运维问答gging.html

Are there anymore that I should be thinking of


I'd add one more: logging is the "hello world" of aspect oriented programming. If you aren't using aspects, you're writing too much code.


I liked the referenced article very much. The only thing i miss is: Define a logging strategy before you start developping an applicaton

Usually logging means writing messages a la "now im doing this" or "Caught Exception Xy".

With "logging strategy" i mean decide who will see what type of message under which circumstances. In my applications if usually have

  • technical message for developper/admins. purpose: to document and fix problems.
  • messages that might be displayed to endusers (i.e. in the statusbar or parts of an errormessage). These should be understandable by endusers
  • a definition which logginglevel (verbose, debug, info, warn, error, fatal) is used when.
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜