diff options
Diffstat (limited to 'tests/syslog_caller.c')
-rw-r--r-- | tests/syslog_caller.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/syslog_caller.c b/tests/syslog_caller.c new file mode 100644 index 00000000..91a1f08b --- /dev/null +++ b/tests/syslog_caller.c @@ -0,0 +1,20 @@ +#include <stdio.h> +#include <stdlib.h> +#include <syslog.h> + +int main(int argc, char *argv[]) +{ + int i; + int sev = 0; + if(argc != 2) { + fprintf(stderr, "usage: syslog_caller num-messages\n"); + exit(1); + } + + int msgs = atoi(argv[1]); + + for(i = 0 ; i < msgs ; ++i) { + syslog(sev % 8, "test message nbr %d, severity=%d", i, sev % 8); + sev++; + } +} |