Minor changes.
[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.4  1995/04/10 13:20:25  adam
8  * Use gettimeofday(2) instead of time(2) to get log time in milliseconds.
9  *
10  * Revision 1.3  1995/02/23  08:32:21  adam
11  * Changed header.
12  *
13  * Revision 1.1.1.1  1995/02/09  17:27:12  adam
14  * Initial version of email gateway under CVS control.
15  *
16  * Initial:       Dec  7, 94 (Adam Dickmeiss)
17  */
18
19 #include <stdio.h>
20 #include <stdlib.h>
21 #include <string.h>
22 #include <stdarg.h>
23
24 #include <gw-log.h>
25
26 int main (int argc, char **argv)
27 {
28     gw_log_init (*argv);
29
30     gw_log_file (GW_LOG_ALL, "all.log");
31     gw_log_file (GW_LOG_WARN, "warn.log");
32
33     gw_log (GW_LOG_ALL, "Msg", "Hi all except WARN");
34     gw_log (GW_LOG_WARN, "Msg", "Hi WARN");
35
36     gw_log (GW_LOG_ALL, "Msg", "Hi all, a");
37     gw_log (GW_LOG_STAT, "Msg", "Hi stat, a");
38     gw_log_file (GW_LOG_WARN, "warn.log");
39     gw_log_file (GW_LOG_FATAL, NULL);
40     gw_log (GW_LOG_ALL, "Msg", "Hi all, b");
41     gw_log (GW_LOG_STAT, "Msg", "Hi stat, b");
42     gw_log (GW_LOG_WARN, "Msg", "Hi warn, b");
43     exit (0);
44 }