Solved

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

Posted on 2004-04-15
3
433 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 250 total points
ID: 10839937
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
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 Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

739 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