Solved

Logging Library

Posted on 2008-10-31
9
150 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
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 150 total points
Comment Utility
0
 
LVL 15

Assisted Solution

by:SRigney
SRigney earned 200 total points
Comment Utility
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
Comment Utility
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
 
LVL 1

Author Comment

by:AWestEng
Comment Utility
But I need it for a Vb.Net exe file, this seems to be to a web application ?
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 1

Author Comment

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

Author Comment

by:AWestEng
Comment Utility
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
Comment Utility
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
Comment Utility
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 69

Assisted Solution

by:Éric Moreau
Éric Moreau earned 150 total points
Comment Utility
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video discusses moving either the default database or any database to a new volume.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now