Solved

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

Posted on 2004-04-15
3
434 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

717 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