1

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-logging.html

Are there anymore that I should be thinking of

Srikar Doddi
  • 15,499
  • 15
  • 65
  • 106

2 Answers2

1

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.

duffymo
  • 305,152
  • 44
  • 369
  • 561
  • @CodeToGlory - look at my post http://stackoverflow.com/questions/4653013/is-there-an-aspect-already-written-and-tested-well-for-trace-logging – Aravind Yarram Feb 16 '11 at 03:01
  • @CodeToGlory - take a look at these 2 questions. http://stackoverflow.com/questions/4313789/what-is-aspectj-good-for and http://stackoverflow.com/questions/4708776/what-is-the-most-common-use-for-aop-in-spring-project – CoolBeans Feb 16 '11 at 03:03
  • I would love for some .Net examples. – Srikar Doddi Feb 16 '11 at 03:15
  • Don't you have Google installed? Isn't the term enough of a lead? http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=.net+aspect+oriented+programming – duffymo Feb 16 '11 at 03:44
0

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.
k3b
  • 14,517
  • 7
  • 53
  • 85