]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5324] Upped the default log size to 10MB
authorThomas Markwalder <tmark@isc.org>
Fri, 11 Aug 2017 14:26:58 +0000 (10:26 -0400)
committerThomas Markwalder <tmark@isc.org>
Fri, 11 Aug 2017 14:26:58 +0000 (10:26 -0400)
doc/guide/logging.xml
src/lib/dhcpsrv/logging_info.h
src/lib/dhcpsrv/tests/logging_info_unittest.cc
src/lib/dhcpsrv/tests/logging_unittest.cc

index 52f9ef8b636421676f8ed3a173795a48f7be46aa..1806982a179d091e1945d963a7a9a8b35604c0d5 100644 (file)
             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>
index 1dda6c295f7620242a8dbe8da6d1152251663124..5dd5a1125773d1b18d9cc728ee56dc024905c3b9 100644 (file)
@@ -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
index 3df9bdc477797f7b4dcc329ea87e128ebfd38443..f7474c94ee519303ec7be90a3e7e68674805ea81 100644 (file)
@@ -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;
index 19c947aca0268d3a437538326ffab982119a07f4..51d96d820d658ea4997593ab03c3502f51fbbc18 100644 (file)
@@ -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.