50 EXPECT_TRUE(file.is_open());
51 string line, exp_line;
57 while (getline(file, line) && (i !=
exp_strings_.size())) {
60 cout <<
"Read line :" << line << endl;
61 cout <<
"Looking for:" << exp_line << endl;
64 if (string::npos == line.find(exp_line)) {
66 cout <<
"Verdict : not found" << endl;
76 cout <<
"Final verdict: false" << endl;
86 EXPECT_TRUE(file.is_open());
93 cout <<
"Looking for:" << exp_string << endl;
95 while (getline(file, line)) {
97 cout <<
"Read line :" << line << endl;
99 if (line.find(exp_string) != string::npos) {
107 cout <<
"Final count: " << cnt << endl;
114 static_cast<void>(
remove(
LOG_FILE));
const std::string & getRootLoggerName()
Get root logger name.
void addOutputOption(const OutputOption &option)
Add output option.
isc::log::Severity keaLoggerSeverity(isc::log::Severity defseverity)
Obtains logging severity from KEA_LOGGER_SEVERITY.
void addString(const string &new_string)
Add a string to the vector of expected strings.
void process(T start, T finish)
Process Specifications.
int keaLoggerDbglevel(int defdbglevel)
Obtains logging debug level from KEA_LOGGER_DBGLEVEL.
static const char * LOG_FILE
bool verbose_
controls whether the checkFile() should print more details.
LogContentTest()
Initializes the logger setup for using in checking log statements.
static const char * KEA_LOG_CHECK_VERBOSE
Destination destination
Members.
vector< string > exp_strings_
Defines the logger used by the top-level component of kea-dhcp-ddns.
void remFile()
remove the test log file
bool checkFile()
check that the requested strings are in the test log file in the requested order. ...
virtual ~LogContentTest()
std::string filename
Filename if file output.
size_t countFile(const string &exp_string)
check that the requested string is in the test log file.
const int MAX_DEBUG_LEVEL