Solved

Logging Library

Posted on 2008-10-31
9
154 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

738 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