Subversion
Written by: Lorna Jane Mitchell
Featured Refcardz: Top Refcardz:
  1. Git
  2. DNS
  3. Data Mining
  4. Spring Data
  5. Subversion
  1. Spring Data
  2. Subversion
  3. Spring Config.
  4. Spring Annotations
  5. Data Mining

Link Details

Link 545547 thumbnail
User 753215 avatar

By fabriziochami
via javacodegeeks.com
Published: Jan 17 2011 / 17:35

Application logging is a critical but often misunderstood part of a system. Our latest JCP partner, Tomasz Nurkiewicz, has submitted a number of posts describing the basic principles of proper application logging. I decided to aggregate them in a more compact format and present them to you. Let's see his suggestions for clean and helpful logs.
  • 50
  • 0
  • 10516
  • 88

Comments

Add your comment
User 168196 avatar

kellyfj replied ago:

0 votes Vote down Vote up Reply

Great article - a must read for java developers who are writing anything that needs to be monitored or debugged by mere mortals!

User 191349 avatar

raveman replied ago:

1 votes Vote down Vote up Reply

great stuff, just some things i disagree with.


log.debug("Returning user ids: {}", collect(users, "id")); should be in log.isDebugEnabled(), most of us work for people that are really into premature optimalization and if the boss is using something, because it creates 3 objects and not 4 than this is a huge problem. I don't want to fight with him over this.

catch(NullPointerException e) is not that bad, but i feel it should be catch(Exception e), do you really care if your debug code is perfect? do you test your debug code?i feel its a code that can be deleted just like that.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.