blob: 707e26c2a0720925e9f24603cc12724903897229 [file] [log] [blame]
dburgess82c46ff2011-10-07 02:40:51 +00001/*
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"
dburgess82c46ff2011-10-07 02:40:51 +000031
dburgess82c46ff2011-10-07 02:40:51 +000032int main(int argc, char *argv[])
33{
Pau Espin Pedrol11d50d92018-02-20 17:52:28 +010034 gLogInit("NOTICE");
dburgess82c46ff2011-10-07 02:40:51 +000035
Pau Espin Pedrola3694bd2018-01-09 19:42:58 +010036 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.";
dburgess82c46ff2011-10-07 02:40:51 +000044 std::cout << "----------- generating 20 alarms ----------" << std::endl;
45 for (int i = 0 ; i < 20 ; ++i) {
Pau Espin Pedrola3694bd2018-01-09 19:42:58 +010046 Log(LOG_ALERT).get() << i;
dburgess82c46ff2011-10-07 02:40:51 +000047 }
dburgess82c46ff2011-10-07 02:40:51 +000048}