Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

.NET logging

Posted on 2004-10-06
15
Medium Priority
?
219 Views
Last Modified: 2010-04-15
I was hoping to get an idea of various logging packages available for .NET.

I've used (and like) log4j in Java and I know there is the .NET equivalent log4net.  What I was wondering is whether or not there are any logging packages built in to the .NET FCL, and if not, what other freewrae (no runtime restrictions) packages are available.
0
Comment
Question by:derekl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +4
15 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12242259
Are you talking about the EventLog class for reading/writing from the system event logs or external files?

Bob
0
 

Author Comment

by:derekl
ID: 12242436
No, just logging arbitrary messages to a file.  Mainly for debugging purposes.
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 128 total points
ID: 12242456
ASP.NET?  If so, then there is the System.Diagnostics.Trace class that you can use.  You can enable tracing in the config file for your web site.

Bob

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:derekl
ID: 12242626
No, .NET console or windows forms applications.
0
 
LVL 9

Expert Comment

by:s_sansanwal
ID: 12244814
Try

http://sourceforge.net/projects/nspring

Cheers,
S Sansanwal
0
 
LVL 18

Expert Comment

by:armoghan
ID: 12246129
0
 
LVL 18

Assisted Solution

by:armoghan
armoghan earned 124 total points
ID: 12246145
0
 
LVL 20

Assisted Solution

by:TheAvenger
TheAvenger earned 124 total points
ID: 12246315
Just use the Trace class as TheLearnedOne mentioned (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDiagnosticsTraceClassTopic.asp). It works for any kind of application, not only ASP.NET.

By default the logging is made in the output window of the VS IDE. However you can with one line add a listener, which writes to a file. Here is how: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdiagnosticstextwritertracelistenerclasstopic.asp

There are other pre-given possibilities too, as well as a lot of possibilities to use your imagination. Read here about it: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdiagnosticstracelistenerclasstopic.asp
0
 
LVL 11

Expert Comment

by:Agarici
ID: 12246323
you can use trace or debug classes to write messages. it you want to output this messages into a file, add a tracelistener that links to that file.

see this msdn link:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdiagnosticstextwritertracelistenerclasstopic.asp


hth,
A.
0
 
LVL 11

Expert Comment

by:Agarici
ID: 12246333
sorry TheAvenger, i did not see your post
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 12246345
NP, happens sometimes when two people are writing the answers simultaneously
0
 
LVL 8

Assisted Solution

by:vinhnl
vinhnl earned 124 total points
ID: 12271676
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question