Fix compilation with old g++ 3.3.5 and debian-sarge.
[wvstreams.git] / Docs / sgmlmanual / egfiles / wvlogfileex.cc
blob05eeea779b655f63ff4c7107aaac848494cecd00
1 /*
2 * A WvLogFile example.
4 * This program creates 2 log files.
5 */
7 #include "wvlogfile.h"
8 #include <signal.h>
10 static bool want_to_die = false;
12 static void sighandler_die(int sig)
14 want_to_die = true;
15 fprintf(stderr,"Exited on Signal: %d\n",sig);
19 int main()
21 signal(SIGTERM, sighandler_die);
22 signal(SIGINT, sighandler_die);
23 signal(SIGXFSZ, sighandler_die);
25 WvLogFile logger("./logtest", WvLog::Debug5);
26 WvLog log("WvLogFile Test", WvLog::Info);
28 while(!want_to_die)
30 log.print("This is a logging test................................\n");
31 log.print("Some more testing.....................................\n");
32 log.print("Even more testing.....................................\n");
34 return 0;