Mark Mendel started a parallel log4c projet with a different philosophy. The design is macro oriented, so much lighter and faster which perfect for kernel development.
Log4c is also available from SourceForge (http://www.sourceforge.net/projects/log4c/). This is work in progress.
__attribute__
, so you will need GCC to compile it. This will probably change one day.
$ gzip -dc log4c-1.2.1.tar.gz | tar tvf - $ cd log4c-1.2.1/ $ ./configure --prefix=/path/of/installation $ make $ make install
Checkout the INSTALL
file for installation and the generated doxygen documentation for more information.
$ sudo rpm -Uvh log4c-1.2.1.i386.rpm log4c-devel-1.2.1.i386.rpm
${LOG4C_RCPATH}/log4crc
${HOME}/
.log4crc
./log4crcLOG4C_RCPATH
holds the prefix used for installation.log4crc
configuration file uses an XML syntax. The root element is
<log4c> and it can be used to control the configuration file version interface with the attribute "version"
. The following 4 elements are supported:
<config>,
<category>,
<appender> and
<layout>.
<config> element controls the global log4c configuration. It has 3 sub elements. The
<nocleanup> flag inhibits the log4c destructors routines. The
<bufsize> element sets the buffer size used to format log4c_logging_event_t objects. If is set to 0, the allocation is dynamic (the
<debug> element is currently unused).
<category> element has 3 possible attributes: the category "name"
, the category "priority"
and the category "appender"
. Future versions will handle multple appenders per category.
<appender> element has 3 possible attributes: the appender "name"
, the appender "type"
, and the appender "layout"
.
<layout> element has 2 possible attributes: the layout "name"
and the layout "type"
.log4crc
configuration file:
This initial version of the log4c configuration file syntax is quite different from log4j. XML seemed the best choice to keep the log4j configuration power in a C API.
LOG4C_RCPATH
holds the path to the main log4crc
configuration file LOG4C_PRIORITY
holds the "root"
category priority LOG4C_APPENDER
holds the "root"
category appenderThis project would not have existed without Ceki Gulcu, the creator and maintainer of Log4j, nor without Bastiaan Bakker, who intiated me with Log4Cpp.
Many thanks to
COPYING
file for full legal details.