开发者

Tips on Application logging

开发者 https://www.devze.com 2023-02-11 12:24 出处:网络
I was going over some tips from javacodegeeks. Was wondering if this article summarizes all the tips and best practices.

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

精彩评论

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

关注公众号