source: trunk/minix/commands/syslogd/syslog_test.c@ 11

Last change on this file since 11 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 557 bytes
Line 
1/*
2** syslog_test
3**
4** Author: Giovanni Falzoni <gfalzoni@inwind.it>
5** $Id: syslog_test.c,v 1.1 2006/04/03 13:07:42 beng Exp $
6*/
7
8#include <sys/types.h>
9#include <unistd.h>
10#include <syslog.h>
11
12/*
13** SYSLOG TEST
14** Very simple utility to test syslog facility.
15*/
16void main(void)
17{
18 int ix;
19
20 openlog("syslog_test", LOG_PID | LOG_NDELAY | LOG_PERROR | LOG_CONS, LOG_DAEMON);
21
22 for (ix = LOG_EMERG; ix <= LOG_DEBUG; ix += 1) {
23 sleep(2);
24 syslog(ix, "message from test program - log level %d", ix);
25 }
26 closelog();
27 return;
28}
29
30/** syslog_test.c **/
Note: See TracBrowser for help on using the repository browser.