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
-----------------------
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
-----------------------
"This reply is provided as is, without warranty express or implied."
Christian Havel - 10 Dec 2007 10:50 GMT
Hi Kerem,
thanks a lot.
Christian
> Hi Christian,
>
[quoted text clipped - 24 lines]
> -----------------------
> "This reply is provided as is, without warranty express or implied."
christery@gmail.com - 10 Dec 2007 11:06 GMT
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
Christian Havel - 10 Dec 2007 11:19 GMT
Thank you
> I´m not en expert but this is what I do....
>
[quoted text clipped - 9 lines]
>
> //CY
Jon Skeet [C# MVP] - 10 Dec 2007 11:57 GMT
On Dec 10, 11:06 am, christ...@gmail.com wrote:
> I´m not en expert but this is what I do....
>
[quoted text clipped - 7 lines]
>
> 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
Martin Carpella - 10 Dec 2007 11:44 GMT
> 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
Norapinephrine - 10 Dec 2007 13:39 GMT
Would log4Net work on .Net 3.0 ?
Jon Skeet [C# MVP] - 10 Dec 2007 13:48 GMT
> Would log4Net work on .Net 3.0 ?
Yes.
Jon
In addition to what already has been said here I would like to
mention NLog.
NLog is an external logging framework like Log4Net. In my
opinion it is more easy to use.
NLog
http://www.nlog-project.org/
Introduction on using NLog
http://www.codeproject.com/KB/trace/nlog.aspx
Groetjes,
Erik
> Hi,
>
[quoted text clipped - 3 lines]
>
> Christian
christery@gmail.com - 12 Dec 2007 20:08 GMT
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