Re: Logging!!?

From: TT \(Tom Tempelaere\) (_N_0SPA|/\|titi_____at_hotmail.com|/\|APS0_N_)
Date: 04/09/04


Date: Fri, 09 Apr 2004 17:57:18 GMT


"Netsharp Ninja" <netsharpninja@hotmail.com> wrote in message
news:%23HkucvcHEHA.2260@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


Relevant Pages

  • Re: Windows Service in C#
    ... Depending on what level of logging you need log4net or the Enterprise Library logging block may be of use. ... I'd start by checking the event log in the application section on the machine where the errors are occuring at just to make sure something hasn't already been logged. ... In this way you can use the debugger against the service in the same way as if you were debugging a standard windows executable. ... This works, but a drawback of this method is that it doesn't allow you to debug the process from the start, so you can miss events you need to see. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: GP NOt Working on One XP Workstation
    ... You probably need to enable logging and try to find any ... possibly related messages in the event log of that machine. ... XP that walks you through enabling logging by policy ...
    (microsoft.public.windows.group_policy)
  • Re: Can you Audit logouts??
    ... > I have auditing for logins/logouts turned on. ... > when people are logging in and logging out? ... > see when user John Doe logged out last week one night if ... The event log is painful to go ...
    (microsoft.public.win2000.security)
  • Re: Logging Exceptions ... Where ?
    ... Logging errors to event log is faster than logging errors to a text file. ... But if you application is yet to be deployed to production server. ... easy of data analysis & purging operations. ...
    (microsoft.public.dotnet.framework)
  • Re: Cannot open log for source {0} -- again
    ... Access Event Log 4/4/2005 in microsoft.public.dotnet.security. ... but web applications are a poor candidate for writing to the ... Even if you're only logging ... >>exceptions, a malicious user of the web application could cause your event ...
    (microsoft.public.dotnet.framework.aspnet.security)