Logging

  • Thread starter Thread starter Christian Havel
  • Start date Start date
C

Christian Havel

Hi,

I am using C# 2.0. Exists any .NET build-in feature for logging or any good
freeware tool?

Christian
 
Hi Christian,
I am using C# 2.0. Exists any .NET build-in feature for logging or any good
freeware tool?

this depends on what you want to log. You can unse the Event Logs
of Windows to write down your applications events. See .NET
Documentation for this. But there is a very powerfull and Open Source
Solution from Apache Software Foundation: Apache Log4NET

http://logging.apache.org/log4net/

It is one of the most powerfull Logging-Frameworks i have ever seen
and i can tell you i have seen a lot of them. Best of all: Open Source!

Hope this helps,...

Regards

Kerem
 
Hi Kerem,

thanks a lot.

Christian


Kerem Gümrükcü said:
Hi Christian,


this depends on what you want to log. You can unse the Event Logs
of Windows to write down your applications events. See .NET
Documentation for this. But there is a very powerfull and Open Source
Solution from Apache Software Foundation: Apache Log4NET

http://logging.apache.org/log4net/

It is one of the most powerfull Logging-Frameworks i have ever seen
and i can tell you i have seen a lot of them. Best of all: Open Source!

Hope this helps,...

Regards

Kerem


-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Microsoft Live Space: http://kerem-g.spaces.live.com/
Latest Open-Source Projects: http://entwicklung.junetz.de
 
I´m not en expert but this is what I do....

eventlog it good, but for some reason I like th old writing to a
logfile, just a plain textfile, but before that is done, check if u
could use ms excel to proces it... format date/time correct, could be
useful if the file becomes big...

another solution is adding it to a database but I still like the .txt
approach, easy to mail, easy to process...

open a streamwriter and... write @"c:\slask.txt" ;)

//CY
 
Kerem Gümrükcü said:
this depends on what you want to log. You can unse the Event Logs
of Windows to write down your applications events. See .NET
Documentation for this. But there is a very powerfull and Open Source
Solution from Apache Software Foundation: Apache Log4NET

http://logging.apache.org/log4net/

You can even log to the Windows Event log using log4net. It is a quite
powerful logging library.

Best regards,
Martin
 
I´m not en expert but this is what I do....

eventlog it good, but for some reason I like th old writing to a
logfile, just a plain textfile, but before that is done, check if u
could use ms excel to proces it... format date/time correct, could be
useful if the file becomes big...

another solution is adding it to a database but I still like the .txt
approach, easy to mail, easy to process...

open a streamwriter and... write @"c:\slask.txt" ;)

I agree that using plaintext log files is good - but using a framework
like log4net gives a much more versatile solution while still
producing a plaintext output (as one option). It will handle rollover,
threading etc for you - manually opening StreamWriters will force you
to implement all that yourself.

Jon
 
Will look at log4net, used log4j in Java. worked great... (easy to
configure about how much to log) but still produced a good old
textfile in the end ... just like I like it...

//CY
 
Back
Top