" \"name\": \"kea\","
" \"output_options\": ["
" {"
- " \"output\": \"stdout\""
+ " \"output\": \"stdout\","
+ " \"flush\": true"
" }"
" ],"
" \"debuglevel\": 99,"
ASSERT_EQ(1, storage->getLoggingInfo()[0].destinations_.size());
EXPECT_EQ("stdout" , storage->getLoggingInfo()[0].destinations_[0].output_);
+ EXPECT_TRUE(storage->getLoggingInfo()[0].destinations_[0].flush_);
}
// Checks if the LogConfigParser class is able to transform JSON structures
ASSERT_EQ(1, storage->getLoggingInfo()[0].destinations_.size());
EXPECT_EQ("logfile.txt" , storage->getLoggingInfo()[0].destinations_[0].output_);
+ // Default for immediate flush is true
+ EXPECT_TRUE(storage->getLoggingInfo()[0].destinations_[0].flush_);
}
// Checks if the LogConfigParser class is able to transform data structures
" \"name\": \"kea\","
" \"output_options\": ["
" {"
- " \"output\": \"logfile.txt\""
+ " \"output\": \"logfile.txt\","
+ " \"flush\": true"
" }"
" ],"
" \"severity\": \"INFO\""
" \"name\": \"wombat\","
" \"output_options\": ["
" {"
- " \"output\": \"logfile2.txt\""
+ " \"output\": \"logfile2.txt\","
+ " \"flush\": false"
" }"
" ],"
" \"severity\": \"DEBUG\","
EXPECT_EQ(isc::log::INFO, storage->getLoggingInfo()[0].severity_);
ASSERT_EQ(1, storage->getLoggingInfo()[0].destinations_.size());
EXPECT_EQ("logfile.txt" , storage->getLoggingInfo()[0].destinations_[0].output_);
+ EXPECT_TRUE(storage->getLoggingInfo()[0].destinations_[0].flush_);
EXPECT_EQ("wombat", storage->getLoggingInfo()[1].name_);
EXPECT_EQ(99, storage->getLoggingInfo()[1].debuglevel_);
EXPECT_EQ(isc::log::DEBUG, storage->getLoggingInfo()[1].severity_);
ASSERT_EQ(1, storage->getLoggingInfo()[1].destinations_.size());
EXPECT_EQ("logfile2.txt" , storage->getLoggingInfo()[1].destinations_[0].output_);
+ EXPECT_FALSE(storage->getLoggingInfo()[1].destinations_[0].flush_);
}
// Checks if the LogConfigParser class is able to transform data structures
EXPECT_EQ(isc::log::INFO, storage->getLoggingInfo()[0].severity_);
ASSERT_EQ(2, storage->getLoggingInfo()[0].destinations_.size());
EXPECT_EQ("logfile.txt" , storage->getLoggingInfo()[0].destinations_[0].output_);
+ EXPECT_TRUE(storage->getLoggingInfo()[0].destinations_[0].flush_);
EXPECT_EQ("stdout" , storage->getLoggingInfo()[0].destinations_[1].output_);
+ EXPECT_TRUE(storage->getLoggingInfo()[0].destinations_[1].flush_);
}
/// @todo There is no easy way to test applyConfiguration() and defaultLogging().