"Netsharp Ninja" <ne***********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
What is the best of loggin in .NET
I am used to use logging into a file with Java but I see many in .NET use
event logging (Well I have not seen other techniques)
From my old days(Client-Server) I am also aware of using Database for this
purpose.
Can you tell me if anybody cares about logging and what is the strategy
adopted for a Enterprise application.
Hi,
I do care, and in my project i've decided to use EventLog.
_Your_ choice should depend on several things. What you are doing with the
log after you write to it? If you would like to query it heavily or if you
would like to link the information with other data, and you don't mind the
overhead, you might want to use a database. Is your application performance
critical? Does your application log a lot, and could it be a bottle-neck?
Then choose the fastest way to log: a simple file. If you want your log to
be integrated in the OS, and easily accessible for maintenance, then choose
the event log. The Event log allows you to filter/sort the records on
several fields, for instance event source, event id, entry date etc etc. I
think that the event log is slower compared to file logging, but faster
compared to databases (haven't made a real comparison, just intuition). And
IIRC, you can connect to an event log from another computer with the event
viewer.
HTH,
---
Tom Tempelaere