Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / December 2007

Tip: Looking for answers? Try searching our database.

Logging

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Christian Havel - 10 Dec 2007 08:50 GMT
Hi,

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

Christian
Kerem Gümrükcü - 10 Dec 2007 10:32 GMT
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
Erik Molenaar - 11 Dec 2007 09:09 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.