diff options
author | Marcin Siodelski <marcin@isc.org> | 2014-09-03 14:25:50 +0200 |
---|---|---|
committer | Marcin Siodelski <marcin@isc.org> | 2014-09-03 14:25:50 +0200 |
commit | 24154b6c62af9fb0ae618e87c0da1d8b99b9f7d2 (patch) | |
tree | 434b87d2791b7412bcd0ea36e70722b16c6b6796 /src/lib/dhcpsrv/logging_info.h | |
parent | [3534] Commit and rollback the staging configuration. (diff) | |
download | kea-24154b6c62af9fb0ae618e87c0da1d8b99b9f7d2.tar.xz kea-24154b6c62af9fb0ae618e87c0da1d8b99b9f7d2.zip |
[3534] Logger configuration can be rolled back.
Previously, the logger configuration was applied (to log4cplus) as soon as
it was parsed. We decided in the jabber discussion that the logger
configuration should only be applied if the whole configuration goes
through. So, the logger configuration is now 2-stage: parsing and commit
as for other configuration parameters.
Diffstat (limited to 'src/lib/dhcpsrv/logging_info.h')
-rw-r--r-- | src/lib/dhcpsrv/logging_info.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/dhcpsrv/logging_info.h b/src/lib/dhcpsrv/logging_info.h index a86c555d6c..fa72407bb2 100644 --- a/src/lib/dhcpsrv/logging_info.h +++ b/src/lib/dhcpsrv/logging_info.h @@ -16,6 +16,7 @@ #define DHCPSRV_LOGGING_INFO_H #include <log/logger_level.h> +#include <log/logger_specification.h> #include <stdint.h> #include <vector> @@ -85,8 +86,11 @@ struct LoggingInfo { std::vector<LoggingDestination> destinations_; /// @brief Default constructor. - LoggingInfo() - : name_("kea"), severity_(isc::log::INFO), debuglevel_(99) { + LoggingInfo(); + + /// @brief Removes logging destinations. + void clearDestinations() { + destinations_.clear(); } /// @brief Compares two objects for equality. @@ -113,6 +117,9 @@ struct LoggingInfo { bool operator!=(const LoggingInfo& other) const { return (!equals(other)); } + + /// @brief Converts logger configuration to a spec. + isc::log::LoggerSpecification toSpec() const; }; /// @brief storage for logging information in log4cplus format |