Life in my own company

Its all up to me.
posts - 137, comments - 166, trackbacks - 113

My Links

News



Twitter



Tag Cloud

Archives

Post Categories

Play

Work

Debugging and error logging

Things have been a little crazy at work, so I haven't posted for a while.

I was reading an article on debugging:  http://www.c-sharpcorner.com/Effectivecs/DebugTechniquesMB001.asp.

Wow, are there better ways to debug or what??  My personal favorite is log4net (related to log4j--see http://logging.apache.org/).  Basically, you can put different levels of logging into your code (all, debug, info, warning, error, fatal) and have them output to a variety of sources, such as text files, rolling text files, event log, remote listener, database, etc.  The best part is that the logging level is configurable at run time, meaning no conditional compilation, no removal of debug code, etc.  Very good for large applications.

The best part is that if done correctly, there is virtually no penalty for keeping your debug code in your application.  The cost is about the same as a boolean comparison, if done correctly.

If you haven't already used it, you should try it.

Print | posted on Tuesday, July 04, 2006 7:58 AM | Filed Under [ Work ]

Feedback

No comments posted yet.

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 8 and 4 and type the answer here:

Powered by: