• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 159
  • Last Modified:

Logging Library

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
AWestEng
Asked:
AWestEng
  • 3
  • 2
  • 2
  • +1
6 Solutions
 
Éric MoreauSenior .Net ConsultantCommented:
0
 
SRigneyCommented:
The standard System.Diagnostics.Debug functionality is very robust as well.  You may not even need to include log4net.
0
 
Gyanendra SinghArchitectCommented:
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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
AWestEngAuthor Commented:
But I need it for a Vb.Net exe file, this seems to be to a web application ?
0
 
AWestEngAuthor Commented:
and there are now examples for windows .Net applications
0
 
AWestEngAuthor Commented:
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
 
SRigneyCommented:
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
 
Gyanendra SinghArchitectCommented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now