1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
|
/**
@mainpage Log4c : Logging for C Library
@htmlonly
<center>
<a href="#summary">Summary</a>
<a href="#requirements">Requirements</a>
<a href="#installation">Installation</a>
<a href="#config">Configuration</a>
<a href="#custom">Customization</a>
<a href="#thanks">Thanks</a>
<a href="#copyright">Copyright</a>
</center>
@endhtmlonly
@section summary Summary
Log4c is a library of C for flexible logging to files, syslog and other
destinations. It is modeled after the Log for Java library
(http://jakarta.apache.org/log4j/), staying as close to their API as is
reasonable. Here is a <a href="http://logging.apache.org/log4j/1.2/manual.html">short
introduction</a> to Log4j which describes the API, and design rationale.
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.
@section requirements Requirements
@subsection platforms Platforms
log4c was successfully compiled and run on the following platforms:
@li HP-UX release 11.00
@li Tru 64 release 4.0F and 5.1
@li Red Hat Linux Intel release 7.x, 8, 9
@li Red Hat Enterprise Linux 3, 4
@li Solaris Intel release 8, 9, 10
@li FreeBSD 6.1-RELEASE
@li AIX 5.3 (with xlc compiler)
@li Mac OS X
@li Windows X
@li ...and other Linux distributions
log4c should compile and run on the following platforms:
@li The BSD family
@li MS Windows
@subsection software Software
The following software is needed to generate log4c:
@li <a href="http://gcc.gnu.org">GCC</a> 3.0.1+, to generate log4c,
but hopefully not to use it.
@li <a href="http://www.stack.nl/~dimitri/doxygen/index.html">doxygen</a>
1.2.13+, a documentation system for C/C++ needed to generate the
documentation.
@li <a href="http://www.graphviz.org/">graphviz</a>, the AT&T Graph
Visualization Tools also needed to generate the documentation.
For the moment, log4c uses specific GCC extensions, like @c __attribute__,
so you will need GCC to compile it. This will probably change one day.
@section installation Installation
@subsection installation_tarballs Building from source tarballs
on SourceForge:
@li <a href="http://prdownloads.sourceforge.net/log4c/log4c-@VERSION@.tar.gz">log4c-@VERSION@.tar.gz</a>
The log4c package uses the GNU autotools compilation and installation
framework. The following commands should build log4c on the supported
platforms:
@code
$ gzip -dc log4c-@VERSION@.tar.gz | tar tvf -
$ cd log4c-@VERSION@/
$ ./configure --prefix=/path/of/installation
$ make
$ make install
@endcode
Checkout the @c INSTALL file for installation and the generated doxygen
documentation for more information.
@section config Configuration
@subsection conf_files Configuration files
log4c searches the following files to load its configuration:
@li @c ${LOG4C_RCPATH}/log4crc
@li @c ${HOME}/.log4crc
@li @c ./log4crc
The environment variable @c LOG4C_RCPATH holds the prefix used for
installation.
@subsection conf_syntax Configuration syntax
The @c log4crc configuration file uses an XML syntax. The root element is
@c <log4c> and it can be used to control the configuration file version
interface with the attribute @c "version". The following 4 elements are
supported: @c <config>, @c <category>, @c <appender> and @c <layout>.
@li The @c <config> element controls the global log4c configuration. It has
3 sub elements. The @c <nocleanup> flag inhibits the log4c destructors
routines. The @c <bufsize> element sets the buffer size used to format
log4c_logging_event_t objects. If is set to 0, the allocation is
dynamic (the @c <debug> element is currently unused).
@li The @c <category> element has 3 possible attributes: the category @c
"name", the category @c "priority" and the category @c "appender". Future
versions will handle multiple appenders per category.
@li The @c <appender> element has 3 possible attributes: the appender @c
"name", the appender @c "type", and the appender @c "layout".
@li The @c <layout> element has 2 possible attributes: the layout @c "name" and
the layout @c "type".
Here's the @c log4crc configuration file example:
@include log4crc.sample
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.
@subsection env Environment variables
@li @c LOG4C_RCPATH holds the path to the main @c log4crc configuration
file
@li @c LOG4C_PRIORITY holds the @c "root" category priority
@li @c LOG4C_APPENDER holds the @c "root" category appender
@section custom Customization
This section will, one day, briefly describe how to define custom appenders
and custom layouts. Be patient or checkout the source.
@section thanks Thanks
Mark Mendel for his work on a previous version of log4c.
This project would not have existed without Ceki Gulcu,
the creator and maintainer of <a
href="http://jakarta.apache.org/log4j">Log4j</a>, nor without
Bastiaan Bakker, who initiated me with <a
href="http://log4cpp.sourceforge.net/">Log4Cpp</a>.
Many thanks to
@li Joel Schaubert for many contributions
@li Robert Byrne for Windows port and also many contributions
@li Olger Warnier for the Mac OS X port
@li Jeff Smith for writing a primer on <a
href="http://jefficus.usask.ca/article.php?story=20040613140849924">how
to use Log4c effectively</a>
@section copyright Copyright
All software in this package is Copyright (C) 2003-2004 Meiosys
http://www.meiosys.com and Cedric Le Goater and is
distributed under the <a
href="http://www.gnu.org/licenses/lgpl.html">LGPL</a> License. See the @c
COPYING file for full legal details.
*/
|