This is how we use them:
FATAL not really used. Usually at the edges to detect if an
application is exiting improperly.
ERROR any condition which will require an administrator to
look at
WARN any unusual conditions which might require
intervention
INFO - ususally information about starting and stopping
state, any data which we want to log in production
DEBUG - any information we don't normally want to log
in production, but might want to log if there are problems
We don't put ERRORs in all of our catch blocks because
sometimes an exception is caught within the application and handled, in which
case it's not an error. Although it is an interesting idea. I'm going to look
over our code and see if it actually makes sense to do that.
Benjamin Peikes
Gargoyle Strategic
Investments
201-227-2209
From: Dru Sellers [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 16, 2004 11:13 AM
To: 'Log4NET User'
Subject: RE: Logging Best Practices
The first bit I am working on right now is how to determine
what each level does.
DEBUG - Add this to your code when you want to be able to
check the state of the app at runtime without debugger
INFO: (Less than Debug)
WARN: ?
ERROR: I am putting these in my Catch
blocks
FATAL: I put this in my outer most class (The actual Form
or Webpage) that way I can catch showstoppers here.
From: Dru Sellers [mailto:[EMAIL PROTECTED]
Sent: Monday, November 15, 2004 5:35 PM
To: 'Log4NET User'
Subject: Logging Best Practices
Just picked up log4net. Anyone have any good links
for how to log your code. I have never done this before and have no reference
material either. Any real life "insert logging code here in your app" links
would be great.
Dru
---
Outgoing mail is certified Virus Free.
Checked by AVG
anti-virus system (http://www.grisoft.com).
Version: 6.0.794 / Virus
Database: 538 - Release Date: 11/10/2004
---
Incoming mail is certified Virus Free.
Checked by AVG
anti-virus system (http://www.grisoft.com).
Version: 6.0.794 / Virus
Database: 538 - Release Date: 11/10/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG
anti-virus system (http://www.grisoft.com).
Version: 6.0.794 / Virus
Database: 538 - Release Date: 11/10/2004