Commit 5ff855e1 authored by Stephen Morris's avatar Stephen Morris
Browse files

[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.
parent ed6b07b6
......@@ -23,6 +23,10 @@ liblog_la_SOURCES += message_types.h
liblog_la_SOURCES += root_logger_name.h
liblog_la_SOURCES += strutil.h
EXTRA_DIST += logger_impl_log4cxx.h
EXTRA_DIST += xdebuglevel.h
# Note: the ordering matters: -Wno-... must follow -Wextra (defined in
......@@ -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
* 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
* In src/lib/log/, uncomment the lines:
# liblog_la_SOURCES += xdebuglevel.h
# liblog_la_LDFLAGS = $(LOG4CXX_LDFLAGS)
* In src/lib/log/test, re-enable testing of the log4cxx implementation
class, i.e.
... and uncomment the following lines in
# run_unittests_SOURCES +=
# run_unittests_SOURCES +=
Then rebuild the system from scratch.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment