Kea  1.5.0
log_utils.h
Go to the documentation of this file.
1 // Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
2 //
3 // This Source Code Form is subject to the terms of the Mozilla Public
4 // License, v. 2.0. If a copy of the MPL was not distributed with this
5 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 
7 #ifndef TEST_LOG_UTILS_H
8 #define TEST_LOG_UTILS_H
9 
10 #include <string>
11 #include <fstream>
12 
13 //#include <config.h>
14 
15 #include <log/logger_manager.h>
16 #include <log/logger_name.h>
17 #include <log/logger_support.h>
18 
19 //#include <boost/shared_ptr.hpp>
20 //#include <boost/scoped_ptr.hpp>
21 #include <gtest/gtest.h>
22 
23 using namespace std;
24 using namespace isc::log;
25 
26 namespace isc {
27 namespace dhcp {
28 namespace test {
29 
39 
40 class LogContentTest : public ::testing::Test {
41 public:
42 
50 
51  virtual ~LogContentTest();
52 
61  bool checkFile();
62 
64  void remFile();
65 
71  void logCheckVerbose(bool talk_a_lot) {
72  verbose_ = talk_a_lot;
73  }
74 
79  void addString(const string& new_string);
80 
81  vector<string> exp_strings_;
82  static const char* LOG_FILE;
83 
90  bool verbose_;
91 };
92 
93 
94 
95 }; // end of isc::dhcp::test namespace
96 }; // end of isc::dhcp namespace
97 }; // end of isc namespace
98 
99 #endif // TEST_LOG_UTILS_H
Test class for testing things that emit log entries.
Definition: log_utils.h:40
void logCheckVerbose(bool talk_a_lot)
Enables or disables verbose mode.
Definition: log_utils.h:71
static const char * LOG_FILE
Definition: log_utils.h:82
bool verbose_
controls whether the checkFile() should print more details.
Definition: log_utils.h:90
vector< string > exp_strings_
Definition: log_utils.h:81
Defines the logger used by the top-level component of kea-dhcp-ddns.
Logging initialization functions.