WvStreams
wvlogfileex.cc
1 /*
2  * A WvLogFile example.
3  *
4  * This program creates 2 log files.
5  */
6 
7 #include "wvlogfile.h"
8 #include <signal.h>
9 
10 static bool want_to_die = false;
11 
12 static void sighandler_die(int sig)
13 {
14  want_to_die = true;
15  fprintf(stderr,"Exited on Signal: %d\n",sig);
16 }
17 
18 
19 int main()
20 {
21  signal(SIGTERM, sighandler_die);
22  signal(SIGINT, sighandler_die);
23  signal(SIGXFSZ, sighandler_die);
24 
25  WvLogFile logger("./logtest", WvLog::Debug5);
26  WvLog log("WvLogFile Test", WvLog::Info);
27 
28  while(!want_to_die)
29  {
30  log.print("This is a logging test................................\n");
31  log.print("Some more testing.....................................\n");
32  log.print("Even more testing.....................................\n");
33  }
34  return 0;
35 }
WvLogFile
A more advanced WvLogFileBase.
Definition: wvlogfile.h:37
WvLog
A WvLog stream accepts log messages from applications and forwards them to all registered WvLogRcv's.
Definition: wvlog.h:56