Logging thoughts

Submitted by slavikt on Mon, 05/14/2007 - 19:26.

The situation around the logging frameworks is not very good in the world of C++. There is no much similarity with .NET or Java world, where the great log4smthng solves all logging issues. Many people uses the self-written libraries.

In fact, the official Apache's log4cxx exists. But it is not very cheerful. It have a strong dependencies on the ACE library, the binaries under Windows are too big (for logging framework). And it is almost dead.

There is one main problem with the logging framework. The logging framework is the most spreaded part of any project. Logging clauses are everywhere in the code. That's why changing the library during the project is a real pain. If the framework's project is dead, it means there will be no support for decent compilers. It could be the problem in the future.

We need a kind of very simple generic interface for the logging. Something like LOG_DECLARE("Category.Path") for declaring class member, and a sort of LOG_DEBUG (and others severities) for putting messages.

Pantheios is the great movement to the right direction. From the library user's point of view, it is just a set of logging interfaces. Logging implementation can be choosed by the backend among almost any logging framework.

There is only one problem: it has no support for wchar_t currently. For me this means that it just can not log anything. So I am staying with log4cxx still.

|

madxkatz (not verified) Says:
Thu, 09/20/2007 - 11:58

Well, for myself, I am reading the documentation to troubleshoot a possible linking problem when porting an application to a new linux kernel. It is hell… did read about the other loggers and perhaps i will move on but for now, i will still continue to understand what is happening and what went wrong..