views:

442

answers:

6

I'm looking at adding logging to an application, and I'm considering using Kiwi syslogd and a freeware library (clSyslog) to send logging messages to the daemon. I briefly looked at log4c, and found compiling it with VC++ would take me more time than I had.

What tools do you use and recommend for logging messages?

+3  A: 

Windows Event Log

Mehrdad Afshari
not exactly a tool....
Mitch Wheat
It has an API...
Mehrdad Afshari
true! .......
Mitch Wheat
Yeah!............ :))
Mehrdad Afshari
+5  A: 

Rolled my own -- this is especially useful for cross-platform stuff. You can take a look at Boost.Log. Note this was rejected when submitted and hence not part of the standard distribution. AFAIK, the author had plans to rewrite this though.

dirkgently
+2  A: 

I'm fond of Poco::LogStream. It's a framework but it does have a really nice logging layer that acts like log4j and the like as far as configuration is concerned but uses the STL for implementation. Quite nice.

D.Shawley
+1  A: 

I've used John Torjo's logging framework (version 1 - not 2) before. It worked very well, so I presume the second version will be as well.

Harper Shelby
This is the same as the candidate Boost.Log. Cheers! ;-)
dirkgently
I knew that was his intent, but I haven't been following it much. When I used the first version, it had been rejected by the Boost review process. It still worked well for me though (and I'm sure v2 is just as good if not better).
Harper Shelby
+2  A: 

In C++ I use a lot of log4cxx.. Don't see why it's a problem to compile, works like champ. It brings lots of benefits. To name just a few - you can re-direct your log statements into syslog or windows event log without ever touching your code base - just change configuration.

Dima
He may be referring to another log4c(something) project, like log4cpp.
Max Lybbert
I see. All right then, I don't know others, but Apache logging services are pretty good. Including log4cxx, I've added the link.
Dima
I'll have to give this one a try. log4j really was my favourite logging environment so far - and I was looking at the log4c - not log4cxx or log4c++.
Kieveli
Works like a charm. You do need to also download Apache Portable Runtime (apr, apr-util, and apr-conv) along with it to make it compile, but it didn't take too much time following the apache log4cxx files!
Kieveli
+1  A: 

I'm a HUGE fan of NLog http://www.nlog-project.org/

Matt Andreko