Linked by Eugenia Loli on Mon 2nd Feb 2004 07:00 UTC
General Development Every C++ program -- and every networking app -- needs a good logging mechanism. ACE provides you with more than one way to handle such things. Consider your application and how you expect it to grow over time. Your choices range from the simple ACE_DEBUG macros to the highly flexible logging service. Regarding .NET, exception handling is more than just throwing and catching objects. There are many design elements in providing a robust system, and providing a sound exception handling, logging, and tracing schema are among the first steps. In this chapter from ".NET Patterns: Architecture, Design, and Process" book, you'll learn best practices for determining when to throw, catch, and log your errors.
Order by: Score:
v Damn it how boring
by Anonymous on Mon 2nd Feb 2004 13:16 UTC
v re: Damn it how boring
by Andreas on Mon 2nd Feb 2004 14:09 UTC
Great article!
by Tetsuo on Mon 2nd Feb 2004 14:18 UTC

Exceptions are the things I foolishly left always last. This is a great article that will be very useful in my programming!

Thank you!

Very Good
by Stack on Mon 2nd Feb 2004 15:40 UTC

Perfect timing! I needed something for error handling and log writing, and this article covered both. I dig the Tracing stuff, too.

for java
by cedric on Mon 2nd Feb 2004 16:14 UTC

a very good document can be found here:
and here

re: Damn it how boring
by Anonymous on Mon 2nd Feb 2004 17:29 UTC

Its not specifically because its .NET, although these articles seem to be biased towards it around here, its just that I don't want to see osnews pointing to IBM's developer site or Sun's developer site every time they have a new developer article on some obscure topic, anymore than I want to see it pointing to msdn every time it updates like it does now. I'm sure the developers in those languages and others visit their sites frequently as it is, and the rest of us just don't need to know particularly.

simple solution...
by nivenh on Mon 2nd Feb 2004 17:58 UTC

if you don't like it, go elsewhere. ;) I like it.

v re: Damn it how boring
by Eugenia on Mon 2nd Feb 2004 18:07 UTC
re: simple solution...
by myzz on Mon 2nd Feb 2004 18:26 UTC

I also like to read these articles, although I have currently no intention to do .NET programming (maybe in future, who knows). But it still quite interesting to learn how things are done in different languages and C# seems to be quite nice language also.

From the first page
"However, an important factor in the logging facility's design is the ability to effectively "no-op" the logging statements at compile time."

Note that a stream based compile time on/off method works easily

// in header
#ifdef NDEBUG
#define MY_DEBUG if( 0 ) cerr
#define MY_DEBUG if( should_runtime_show() )

// in program
MY_DEBUG << "foo" << endl;

RE: Q ACE Logging
by nmackie on Tue 3rd Feb 2004 09:28 UTC

The first link in the original article "Your choices" does not work. If you have a replacement please post.

I'm interested in ACE_DEBUG but cannot find documentation at the ACE site. In another employment we had a class+macro that allowed us to switch on/off debug logging/tracing messages at run time on a class by class basis and I'm looking for something similar. If you have suggestions please post.