diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-02-20 17:38:18 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-02-20 18:26:45 +0100 |
commit | 8bd111c942d0d8d2c65369db8f2623eadef54c1e (patch) | |
tree | 1abe84932d9acae2d2cd85e7c508e0f597ff7394 /tests/CommonLibs | |
parent | 3808e479aa1d1be6bfb1320aa4a7202a14db3ae8 (diff) |
Logger: get rid of alarm APIs
It's only used internally inside the Logger module, and in case there's
an "alarm" (level more than critical) we still print on cerr, so we can
just rely on our system catching stderr instead of stdout to handle it.
Change-Id: I6d6df1578c3a4c1a37bd0d69952d443f62eed2ab
Diffstat (limited to 'tests/CommonLibs')
-rw-r--r-- | tests/CommonLibs/LogTest.cpp | 14 | ||||
-rw-r--r-- | tests/CommonLibs/LogTest.ok | 32 |
2 files changed, 0 insertions, 46 deletions
diff --git a/tests/CommonLibs/LogTest.cpp b/tests/CommonLibs/LogTest.cpp index f64041d..5d1dd2c 100644 --- a/tests/CommonLibs/LogTest.cpp +++ b/tests/CommonLibs/LogTest.cpp @@ -29,14 +29,6 @@ #include "Logger.h" -void printAlarms() -{ - std::ostream_iterator<std::string> output( std::cout, "\n" ); - std::list<std::string> alarms = gGetLoggerAlarms(); - std::cout << "# alarms = " << alarms.size() << std::endl; - std::copy( alarms.begin(), alarms.end(), output ); -} - int main(int argc, char *argv[]) { gLogInit("LogTest","NOTICE",LOG_LOCAL7); @@ -49,14 +41,8 @@ int main(int argc, char *argv[]) Log(LOG_NOTICE).get() << " testing the logger."; Log(LOG_INFO).get() << " testing the logger."; Log(LOG_DEBUG).get() << " testing the logger."; - std::cout << "\n\n\n"; - std::cout << "testing Alarms\n"; - std::cout << "you should see three lines:" << std::endl; - printAlarms(); std::cout << "----------- generating 20 alarms ----------" << std::endl; for (int i = 0 ; i < 20 ; ++i) { Log(LOG_ALERT).get() << i; } - std::cout << "you should see ten lines with the numbers 10..19:" << std::endl; - printAlarms(); } diff --git a/tests/CommonLibs/LogTest.ok b/tests/CommonLibs/LogTest.ok index e1211b0..ac60314 100644 --- a/tests/CommonLibs/LogTest.ok +++ b/tests/CommonLibs/LogTest.ok @@ -6,16 +6,6 @@ WARNING testing the logger. NOTICE testing the logger. INFO testing the logger. DEBUG testing the logger. - - - -testing Alarms -you should see three lines: -# alarms = 4 -EMERG testing the logger. -ALERT testing the logger. -CRIT testing the logger. -ERR testing the logger. ----------- generating 20 alarms ---------- ALERT 0 ALERT 1 @@ -37,25 +27,3 @@ ALERT 16 ALERT 17 ALERT 18 ALERT 19 -you should see ten lines with the numbers 10..19: -# alarms = 20 -ALERT 0 -ALERT 1 -ALERT 2 -ALERT 3 -ALERT 4 -ALERT 5 -ALERT 6 -ALERT 7 -ALERT 8 -ALERT 9 -ALERT 10 -ALERT 11 -ALERT 12 -ALERT 13 -ALERT 14 -ALERT 15 -ALERT 16 -ALERT 17 -ALERT 18 -ALERT 19 |