You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by Francesco Pretto <ce...@gmail.com> on 2015/03/24 23:41:51 UTC

ITRLogging: a log4cxx extension with a simplified macro interface

Dear log4cxx users and developers,

I wanted to communicate the availability of ITRLogging, a log4cxx
extension that redesigns log4cxx usage pattern in several ways.
ITRLogging:

* supports a new level layout (DETAIL, MOREDETAIL, MAXDETAIL, ...);
* supports hierarchical default logger caching: static, class, and function;
* provides a C macro and API wrapper;
* supports a configuration method (properties file based) enabled by
default with watch, configurable with environment variables;
* can be fully disabled.

While the new usage pattern is very guided and may not suit everybody,
the recommened pratice is to embedd it in the code so one can also
customize it's init behavior and other aspects.

The new custom level layout has been introduced using hidden but
properly working features of log4cxx: "log4j.loggerFactory"[1] and
"LEVEL#Factory"[2] syntax. ITRLogging answers the log4cxx FAQ[3] about
adding a custom level to log4cxx, as existing answer wasn't really
satisfactory. A new level layout has been chosen because of lack of
comfort with the official log4cxx one.

The other features of ITRLogging allow to log without providing a
logger (name or identifier) using a macro based interface that caches
the currently used default logger. Also a C wrapper is provided,
allowing to use log4cxx with pretty much the same macros and
efficiency in pure C applications. The C wrapper also allows to easily
create other languages wrappers, such as C# (an unreleased one already
exists), providing an option in mixed managed/unmanaged code
applications that need to do logging at all levels.

ITRLogging was firstly developed in Windows but it's already used in
linux applications too. Also C only applications were extensively
tested on gcc compiler.

By no way this project is aiming at becoming a distributable shared
library. You are encouraged to fork the code to add new features and
customizations.

Let me know if you like some of the new introduced ideas or for any
thought you wanted to share. You can find full details and
documentation on the project repository:

    https://github.com/it-robotics/ITRLogging

License is Apache License version 2.0.


[1] http://svn.apache.org/viewvc/incubator/log4cxx/trunk/src/main/cpp/propertyconfigurator.cpp?view=markup
[2] http://svn.apache.org/viewvc/incubator/log4cxx/trunk/src/main/cpp/optionconverter.cpp?view=markup
[3] http://logging.apache.org/log4cxx/faq.html#custom_levels