diff options
author | Thomas Markwalder <tmark@isc.org> | 2017-08-11 16:26:58 +0200 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2017-08-11 16:26:58 +0200 |
commit | 3493d0412238ae0ecd2ca0584c6f9532881673b3 (patch) | |
tree | 674c3e25d4e674fd129015c9d1668d47548ec26c | |
parent | [5324] Log file rotation now works when configured to do so (diff) | |
download | kea-3493d0412238ae0ecd2ca0584c6f9532881673b3.tar.xz kea-3493d0412238ae0ecd2ca0584c6f9532881673b3.zip |
[5324] Upped the default log size to 10MB
-rw-r--r-- | doc/guide/logging.xml | 4 | ||||
-rw-r--r-- | src/lib/dhcpsrv/logging_info.h | 2 | ||||
-rw-r--r-- | src/lib/dhcpsrv/tests/logging_info_unittest.cc | 4 | ||||
-rw-r--r-- | src/lib/dhcpsrv/tests/logging_unittest.cc | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/doc/guide/logging.xml b/doc/guide/logging.xml index 52f9ef8b63..1806982a17 100644 --- a/doc/guide/logging.xml +++ b/doc/guide/logging.xml @@ -635,8 +635,8 @@ is renamed ".2", etc. This is referred to as rotation. </para> <para> - The default value is 204800. This is also the smallest value that - may be specified without disabling rotation. Any value less than + The default value is 10240000 (10MB). The smallest value that may + be specified without disabling rotation is 204800. Any value less than this, including 0, disables rotation. </para> <note> diff --git a/src/lib/dhcpsrv/logging_info.h b/src/lib/dhcpsrv/logging_info.h index 1dda6c295f..5dd5a11257 100644 --- a/src/lib/dhcpsrv/logging_info.h +++ b/src/lib/dhcpsrv/logging_info.h @@ -45,7 +45,7 @@ struct LoggingDestination : public isc::data::CfgToElement { /// @brief Default constructor. LoggingDestination() - : output_("stdout"), maxver_(1), maxsize_(204800), flush_(true) { + : output_("stdout"), maxver_(1), maxsize_(10240000), flush_(true) { } /// @brief Unparse a configuration object diff --git a/src/lib/dhcpsrv/tests/logging_info_unittest.cc b/src/lib/dhcpsrv/tests/logging_info_unittest.cc index 3df9bdc477..f7474c94ee 100644 --- a/src/lib/dhcpsrv/tests/logging_info_unittest.cc +++ b/src/lib/dhcpsrv/tests/logging_info_unittest.cc @@ -74,7 +74,7 @@ TEST_F(LoggingInfoTest, defaults) { std::string header = "{\n" "\"name\": \"kea\",\n" "\"output_options\": [ {\n" - " \"output\": \"stdout\",\n \"maxsize\": 204800,\n" + " \"output\": \"stdout\",\n \"maxsize\": 10240000,\n" " \"maxver\": 1,\n \"flush\": true } ],\n" "\"severity\": \""; std::string dbglvl = "\",\n\"debuglevel\": "; @@ -91,7 +91,7 @@ TEST_F(LoggingInfoTest, defaults) { ASSERT_EQ(1, info_verbose.destinations_.size()); EXPECT_EQ("stdout", info_verbose.destinations_[0].output_); - EXPECT_EQ(204800, info_verbose.destinations_[0].maxsize_); + EXPECT_EQ(10240000, info_verbose.destinations_[0].maxsize_); EXPECT_EQ(1, info_verbose.destinations_[0].maxver_); expected = header + "DEBUG" + dbglvl + "99" + trailer; diff --git a/src/lib/dhcpsrv/tests/logging_unittest.cc b/src/lib/dhcpsrv/tests/logging_unittest.cc index 19c947aca0..51d96d820d 100644 --- a/src/lib/dhcpsrv/tests/logging_unittest.cc +++ b/src/lib/dhcpsrv/tests/logging_unittest.cc @@ -73,7 +73,7 @@ class LoggingTest : public ::testing::Test { }; const char* LoggingTest::TEST_LOG_NAME = "kea.test.log"; -const int LoggingTest::TEST_MAX_SIZE = 207800; // Slightly larger than default +const int LoggingTest::TEST_MAX_SIZE = 204800; // Smallest without disabling rotation const int LoggingTest::TEST_MAX_VERS = 2; // More than the default of 1 // Tests that the spec file is valid. |