Logging

C

Christian Havel

Hi,

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

Christian
 
K

Kerem Gümrükcü

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
 
C

Christian Havel

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
 
C

christery

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
 
M

Martin Carpella

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
 
J

Jon Skeet [C# MVP]

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
 
C

christery

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top