Initial revision
[egate.git] / res+log / gw-log-test.c
diff --git a/res+log/gw-log-test.c b/res+log/gw-log-test.c
new file mode 100644 (file)
index 0000000..ea5a226
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+   gw-log-test.c: Test of logging facilities.
+
+   Europagate, 1994-1995.
+
+   $Log: gw-log-test.c,v $
+   Revision 1.1  1995/02/09 17:27:11  adam
+   Initial revision
+
+
+   Initial:       Dec  7, 94 (Adam Dickmeiss)
+   Last update:   Dec 13, 94 (Adam Dickmeiss)
+
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+
+#include <gw-log.h>
+
+int main (int argc, char **argv)
+{
+    gw_log_init (*argv);
+
+    gw_log_file (GW_LOG_ALL, "all.log");
+
+    gw_log (GW_LOG_ALL, "Msg", "Hi all, a");
+    gw_log (GW_LOG_STAT, "Msg", "Hi stat, a");
+    gw_log_file (GW_LOG_WARN, "warn.log");
+    gw_log_file (GW_LOG_FATAL, NULL);
+    gw_log (GW_LOG_ALL, "Msg", "Hi all, b");
+    gw_log (GW_LOG_STAT, "Msg", "Hi stat, b");
+    gw_log (GW_LOG_WARN, "Msg", "Hi warn, b");
+    exit (0);
+}