Bug fix: GW_LOG_ERRNO.
[egate.git] / res+log / gw-log-test.c
1 /*
2  * Test of logging facilities.
3  *
4  * Europagate, 1994-1995.
5  *
6  * $Log: gw-log-test.c,v $
7  * Revision 1.3  1995/02/23 08:32:21  adam
8  * Changed header.
9  *
10  * Revision 1.1.1.1  1995/02/09  17:27:12  adam
11  * Initial version of email gateway under CVS control.
12  *
13  * Initial:       Dec  7, 94 (Adam Dickmeiss)
14  */
15
16 #include <stdio.h>
17 #include <stdlib.h>
18 #include <string.h>
19 #include <stdarg.h>
20
21 #include <gw-log.h>
22
23 int main (int argc, char **argv)
24 {
25     gw_log_init (*argv);
26
27     gw_log_file (GW_LOG_ALL, "all.log");
28
29     gw_log (GW_LOG_ALL, "Msg", "Hi all, a");
30     gw_log (GW_LOG_STAT, "Msg", "Hi stat, a");
31     gw_log_file (GW_LOG_WARN, "warn.log");
32     gw_log_file (GW_LOG_FATAL, NULL);
33     gw_log (GW_LOG_ALL, "Msg", "Hi all, b");
34     gw_log (GW_LOG_STAT, "Msg", "Hi stat, b");
35     gw_log (GW_LOG_WARN, "Msg", "Hi warn, b");
36     exit (0);
37 }