?
Solved

Is there any log component for C# which works like log4j in Java?

Posted on 2004-04-15
3
Medium Priority
?
436 Views
Last Modified: 2010-04-15
Is there any component for C# which works like the log4j in Java?
It means I can use it to define the type of log information, such as Debug, Warning, Error, etc. And I also want to generate the log output into either window console, windows Form, or physical file.
Do anyone has any idea about it?

Thanks!
0
Comment
Question by:Justlogin
[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
3 Comments
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 10838542
the object is called Trace (you provide TraceListeners)

default it will go to debug window ...

you can easily create your own tracelistener for file etc ..

I am quite sure you can find a File TraceListener on a google search.

0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 10839928
Actually the file trace listener comes ready with the .net framework. It is called TextWriterTraceListener.

Justlogin, you should read about trace listeners and trace switches. Then you can write your code in such a way, that you can later configure it by changing the config file of your application.

You can start your exploration from here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskCreatingInitializingTraceSwitches.asp
0
 
LVL 20

Accepted Solution

by:
TheAvenger earned 750 total points
ID: 10839937
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

765 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