Solved

Logging Library

Posted on 2008-10-31
9
156 Views
Last Modified: 2013-11-07
Hi guys!

I need to write a logging module (dll) that handles logging for my executable projects any tips where to start.

I like to log exceptions and custom messages
0
Comment
Question by:AWestEng
[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
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 150 total points
ID: 22852317
0
 
LVL 15

Assisted Solution

by:SRigney
SRigney earned 200 total points
ID: 22852436
The standard System.Diagnostics.Debug functionality is very robust as well.  You may not even need to include log4net.
0
 
LVL 16

Assisted Solution

by:Gyanendra Singh
Gyanendra Singh earned 150 total points
ID: 22855545
if you want to create your own logger refer this

http://www.codeproject.com/KB/vb/ErrorsAndEventsExample.aspx

else go fro Log4net as suggested by emoreau or use Logging and Instrumentation Application Block ( provided by microsoft)

http://www.codeproject.com/KB/architecture/GetStartedLoggingBlock.aspx

for log4net
http://www.codeproject.com/KB/aspnet/log4net.aspx
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 1

Author Comment

by:AWestEng
ID: 22858760
But I need it for a Vb.Net exe file, this seems to be to a web application ?
0
 
LVL 1

Author Comment

by:AWestEng
ID: 22858814
and there are now examples for windows .Net applications
0
 
LVL 1

Author Comment

by:AWestEng
ID: 22858959
thx guys for the examples.
log4net seems a  bit complex in my case, I must write my own one in this projects  so any other more "easier/smaller" examples?
 
0
 
LVL 15

Assisted Solution

by:SRigney
SRigney earned 200 total points
ID: 22859678
Using System.Diagnostics.Debug you can use the build in trace functionality.

http://msdn.microsoft.com/en-us/library/zd83saa2(VS.80).aspx


The trace listener can be hard coded or configured in a config file.
http://msdn.microsoft.com/en-us/library/system.diagnostics.tracelistener.aspx

If you are building your own class because you want to that's one thing.   But the built in version is the most simple with Log4net being only very slightly more complicated.   And both will be more simple than writing your own error handling around writing to files or whatever alternative output method you decide to use.
0
 
LVL 16

Assisted Solution

by:Gyanendra Singh
Gyanendra Singh earned 150 total points
ID: 22860326
refer this .. copy that class and use in your project and just pass the require information to that class thats it

http://www.codeproject.com/KB/vb/ErrorsAndEventsExample.aspx
0
 
LVL 70

Assisted Solution

by:Éric Moreau
Éric Moreau earned 150 total points
ID: 22861701
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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
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.

622 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