main.doc.in 5.6 KB

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