00001
00002
00003
00004
00005
00006
00007
#include "wvlogfile.h"
00008
#include <signal.h>
00009
00010 static bool want_to_die =
false;
00011
00012 static void sighandler_die(
int sig)
00013 {
00014
want_to_die =
true;
00015 fprintf(stderr,
"Exited on Signal: %d\n",sig);
00016 }
00017
00018
00019 int main()
00020 {
00021 signal(SIGTERM,
sighandler_die);
00022 signal(SIGINT,
sighandler_die);
00023 signal(SIGXFSZ,
sighandler_die);
00024
00025
WvLogFile logger(
"./logtest", WvLog::Debug5);
00026
WvLog log(
"WvLogFile Test", WvLog::Info);
00027
00028
while(!
want_to_die)
00029 {
00030
log.
print(
"This is a logging test................................\n");
00031
log.
print(
"Some more testing.....................................\n");
00032
log.
print(
"Even more testing.....................................\n");
00033 }
00034
return 0;
00035 }