dburgess | 82c46ff | 2011-10-07 02:40:51 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2009 Free Software Foundation, Inc. |
| 3 | * Copyright 2010 Kestrel Signal Processing, Inc. |
| 4 | * |
| 5 | * |
| 6 | * This software is distributed under the terms of the GNU Affero Public License. |
| 7 | * See the COPYING file in the main directory for details. |
| 8 | * |
| 9 | * This use of this software may be subject to additional restrictions. |
| 10 | * See the LEGAL file in the main directory for details. |
| 11 | |
| 12 | This program is free software: you can redistribute it and/or modify |
| 13 | it under the terms of the GNU Affero General Public License as published by |
| 14 | the Free Software Foundation, either version 3 of the License, or |
| 15 | (at your option) any later version. |
| 16 | |
| 17 | This program is distributed in the hope that it will be useful, |
| 18 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | GNU Affero General Public License for more details. |
| 21 | |
| 22 | You should have received a copy of the GNU Affero General Public License |
| 23 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 24 | |
| 25 | */ |
| 26 | |
| 27 | #include <iostream> |
| 28 | #include <iterator> |
| 29 | |
| 30 | #include "Logger.h" |
dburgess | 82c46ff | 2011-10-07 02:40:51 +0000 | [diff] [blame] | 31 | |
dburgess | 82c46ff | 2011-10-07 02:40:51 +0000 | [diff] [blame] | 32 | int main(int argc, char *argv[]) |
| 33 | { |
Pau Espin Pedrol | 11d50d9 | 2018-02-20 17:52:28 +0100 | [diff] [blame] | 34 | gLogInit("NOTICE"); |
dburgess | 82c46ff | 2011-10-07 02:40:51 +0000 | [diff] [blame] | 35 | |
Pau Espin Pedrol | a3694bd | 2018-01-09 19:42:58 +0100 | [diff] [blame] | 36 | Log(LOG_EMERG).get() << " testing the logger."; |
| 37 | Log(LOG_ALERT).get() << " testing the logger."; |
| 38 | Log(LOG_CRIT).get() << " testing the logger."; |
| 39 | Log(LOG_ERR).get() << " testing the logger."; |
| 40 | Log(LOG_WARNING).get() << " testing the logger."; |
| 41 | Log(LOG_NOTICE).get() << " testing the logger."; |
| 42 | Log(LOG_INFO).get() << " testing the logger."; |
| 43 | Log(LOG_DEBUG).get() << " testing the logger."; |
dburgess | 82c46ff | 2011-10-07 02:40:51 +0000 | [diff] [blame] | 44 | std::cout << "----------- generating 20 alarms ----------" << std::endl; |
| 45 | for (int i = 0 ; i < 20 ; ++i) { |
Pau Espin Pedrol | a3694bd | 2018-01-09 19:42:58 +0100 | [diff] [blame] | 46 | Log(LOG_ALERT).get() << i; |
dburgess | 82c46ff | 2011-10-07 02:40:51 +0000 | [diff] [blame] | 47 | } |
dburgess | 82c46ff | 2011-10-07 02:40:51 +0000 | [diff] [blame] | 48 | } |