2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-05 00:15:17 +00:00

[trac622] Update documentation

Remove (most) references to log4cxx in the documentation.  Ensure
that the documentation and the "experimental" files mentioned in it
are included in the distribution.
This commit is contained in:
Stephen Morris
2011-03-07 16:06:26 +00:00
parent ed6b07b60a
commit 5ff855e14d
2 changed files with 11 additions and 54 deletions

View File

@@ -23,6 +23,10 @@ liblog_la_SOURCES += message_types.h
liblog_la_SOURCES += root_logger_name.cc root_logger_name.h
liblog_la_SOURCES += strutil.h strutil.cc
EXTRA_DIST = README
EXTRA_DIST += logger_impl_log4cxx.cc logger_impl_log4cxx.h
EXTRA_DIST += xdebuglevel.cc xdebuglevel.h
# Note: the ordering matters: -Wno-... must follow -Wextra (defined in
# B10_CXXFLAGS)
liblog_la_CXXFLAGS = $(AM_CXXFLAGS)

View File

@@ -233,8 +233,8 @@ To use the current version of the logging:
isc::log::Logger logger("myname", true);
The argument is ignored for underlying implementations other than log4cxx.
See below for the use of this argument.
(The argument is required to support a possible future implementation of
logging. Currently it has no effect.)
3. The main program unit should include a call to isc::log::runTimeInit()
(defined in logger_support.h) to set the logging severity, debug log level,
@@ -379,56 +379,9 @@ Outstanding Issues
log4cxx Issues
==============
Some experimental code to utilise log4cxx as an underlying implementation
is present in the source code directory, although it is not currently used.
The files are:
Second Argument in Logger Constructor
-------------------------------------
As noted above, when using log4cxx as the underlying implementation, the
argument to the logger's constructor should be set true if declaring the
logger within a method and set false (or omitted) if declaring the logger
external to an execution unit.
This is due to an apparent bug in the underlying log4cxx, where the deletion
of a statically-declared object at program termination can cause a segment
fault. (The destruction of internal memory structures can sometimes happen
out of order.) By default the Logger class creates the structures in
its constructor but does not delete them in the destruction. The default
behavious works because instead of reclaiming memory at program run-down,
the operating system reclaims it when the process is deleted.
Setting the second argument "true" causes the Logger's destructor to delete
the log4cxx structures. This does not cause a problem if the program is
not terminating. So use the second form when declaring an automatic instance
of isc::log::Logger on the stack.
Building with log4cxx
---------------------
Owing to issues with versions of log4cxx on different systems, log4cxx was
temporarily disabled. To use log4cxx on your system:
* Uncomment the log4cxx lines in configure.ac
* In src/lib/log, replace the logger_impl.{cc,h} files with their log4cxx
equivalents, i.e.
cp logger_impl_log4cxx.h logger_impl.h
cp logger_impl_log4cxx.cc logger_impl.cc
* In src/lib/log/Makefile.am, uncomment the lines:
# AM_CPPFLAGS += $(LOG4CXX_INCLUDES)
# liblog_la_SOURCES += xdebuglevel.cc xdebuglevel.h
# liblog_la_LDFLAGS = $(LOG4CXX_LDFLAGS)
* In src/lib/log/test, re-enable testing of the log4cxx implementation
class, i.e.
cp logger_impl_log4cxx_unittest.cc logger_impl_unittest.cc
... and uncomment the following lines in Makefile.am:
# run_unittests_SOURCES += logger_impl_unittest.cc
# run_unittests_SOURCES += xdebuglevel_unittest.cc
Then rebuild the system from scratch.
logger_impl_log4cxx.{cc,h}
xdebuglevel.{cc,h}