1.2.7
by Michael Biebl
Import upstream version 4.2.0 |
1 |
/* msggen - a small diagnostic utility that does very quick
|
2 |
* syslog() calls.
|
|
3 |
*
|
|
4 |
* Copyright 2008 Rainer Gerhards and Adiscon GmbH.
|
|
5 |
*
|
|
6 |
* This file is part of rsyslog.
|
|
7 |
*
|
|
8 |
* Rsyslog is free software: you can redistribute it and/or modify
|
|
9 |
* it under the terms of the GNU General Public License as published by
|
|
10 |
* the Free Software Foundation, either version 3 of the License, or
|
|
11 |
* (at your option) any later version.
|
|
12 |
*
|
|
13 |
* Rsyslog is distributed in the hope that it will be useful,
|
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16 |
* GNU General Public License for more details.
|
|
17 |
*
|
|
18 |
* You should have received a copy of the GNU General Public License
|
|
19 |
* along with Rsyslog. If not, see <http://www.gnu.org/licenses/>.
|
|
20 |
*
|
|
21 |
* A copy of the GPL can be found in the file "COPYING" in this distribution.
|
|
22 |
*/
|
|
23 |
||
24 |
#include <stdio.h> |
|
25 |
#include <syslog.h> |
|
26 |
||
27 |
int main(int argc, char *argv[]) |
|
28 |
{
|
|
29 |
int i; |
|
30 |
||
31 |
openlog("msggen", 0 , LOG_LOCAL0); |
|
32 |
||
33 |
for(i = 0 ; i < 10 ; ++i) |
|
34 |
syslog(LOG_NOTICE, "This is message number %d", i); |
|
35 |
||
36 |
closelog(); |
|
37 |
return 0; |
|
38 |
}
|