-8xx. [bug] tomek
++838. [bug] tomek
+ Kea components now use the KEA_LOCKFILE_DIR environment variable
+ to specify the directory of the logging lockfile. Locking can be
+ disabled completely by setting the variable to 'none'.
- (Trac #3591, git tbd)
++ (Trac #3591, git d4556e1d21766b94f2f0cda59df15e47e6f2676e)
++
+837. [bug,doc] tomek
+ Logging configuration examples in kea.conf fixed. Also updated
+ Kea documentation for logging.
+ (Trac #3536, git 2cf3f6b9cb3d2ae6fc7b0940b55490f109ddd2f9)
+
+836. [bug] fdupont
+ Moved duplicated getXXXHashAlgorithm() function to new
+ xxx_common.h include files in the cryptolink library.
+ (Trac #3471, git 8cf2ee46b3d7398f4f716435be3d9b19bf3599f5)
+
+835. [build] fdupont
+ The configure script checks if OpenSSL supports SHA-2, in order
+ to avoid very old (and likely subject to unfixed security bugs)
+ OpenSSL versions.
+ (Trac #3482, git c779a0ef23d2092cf896276dab1fbcb190380374)
+
+834. [bug] marcin
+ Corrected the definition of the example DHCPv4 and DHCPv6 address
+ pools in the default kea.conf file.
+ (Trac #3538, git 8712cc0df77368940d8d3d11811a9ac9504bce12)
+
+833. [func] marcin
+ Configuration Manager supports two stage configuration. In the
+ first stage a temporary configuration is created and in the
+ second stage this configuration is committed. If configuration
+ fails at the first stage, the temporary configuration is rolled
+ back and the server continues to use the old configuration.
+ (Trac #3534, git 4ecee3c0c97fe417b050317356f9093ba3771a15)
Kea 0.9 released on August 29, 2014
# These steps are necessary during installation
install-exec-hook:
+ mkdir -p $(DESTDIR)${localstatedir}/log/
+ mkdir -p $(DESTDIR)${localstatedir}/run/${PACKAGE_NAME}
### include tool to generate documentation from log message specifications
### in the distributed tarball:
<title>Logging</title>
<section>
- <title>Logging configuration</title>
+ <title>Logging Configuration</title>
<para>
+ During its operation Kea may produce many messages. They differ in
+ severity (some are more important than others) and source (some are
+ produced by specific components, e.g. hooks). It is useful to understand
+ which log messages are needed and which are not and configure your
+ logging appropriately. For example, debug level messages can be safely
+ ignored in a typical deployment. They are, however, very useful when
+ debugging a problem.
+ </para>
+ <para>
The logging system in Kea is configured through the
- Logging module. All modules will look at the
- configuration in Logging to see what should be logged and
- to where.
-
-<!-- TODO: what is context of Logging module for readers of this guide? -->
-
+ <replaceable>Logging</replaceable> structure in your configuration
+ file. All daemons (e.g. DHCPv4 and DHCPv6 servers) will use the
+ configuration in the <replaceable>Logging</replaceable> structure to see
+ what should be logged and to where. This allows for sharing identical
+ logging configuration between daemons.
</para>
<section>
}
void Daemon::configureLogger(const isc::data::ConstElementPtr& log_config,
- const ConfigurationPtr& storage,
- bool verbose) {
-
- if (!log_config) {
- // There was no logger configuration. Let's clear any config
- // and revert to the default.
-
- isc::log::setDefaultLoggingOutput(verbose); // Set up default logging
- return;
- }
-
- isc::data::ConstElementPtr loggers = log_config->get("loggers");
- if (!loggers) {
- // There is Logging structure, but it doesn't have loggers
- // array in it. Let's clear any old logging configuration
- // we may have and revert to the default.
-
- isc::log::setDefaultLoggingOutput(verbose); // Set up default logging
- return;
+ const SrvConfigPtr& storage) {
+
+ if (log_config) {
+ isc::data::ConstElementPtr loggers = log_config->get("loggers");
+ if (loggers) {
+ LogConfigParser parser(storage);
+ parser.parseConfiguration(loggers, CfgMgr::instance().isVerbose());
+ }
}
+}
- // This is utility class that translates JSON structures into formats
- // understandable by log4cplus.
- LogConfigParser parser(storage);
-
- // Translate JSON structures into log4cplus formats
- parser.parseConfiguration(loggers, verbose);
-
- // Apply the configuration
+void
+Daemon::setVerbose(bool verbose) {
+ CfgMgr::instance().setVerbose(verbose);
+}
- /// @todo: Once configuration unrolling is implemented,
- /// this call will be moved to a separate method.
- parser.applyConfiguration();
+bool
+Daemon::getVerbose() const {
+ return (CfgMgr::instance().isVerbose());
}
+ void Daemon::loggerInit(const char* name, bool verbose) {
+
+ // Initialize logger system
+ isc::log::initLogger(name, isc::log::DEBUG, isc::log::MAX_DEBUG_LEVEL,
+ NULL);
+
+ // Apply default configuration (log INFO or DEBUG to stdout)
+ isc::log::setDefaultLoggingOutput(verbose);
+ }
+
};
};