00001
00002 #include <stdio.h>
00003 #include <stdlib.h>
00004
00005 #include <rtsLog.h>
00006
00007 int main(int argc, char *argv[])
00008 {
00009 int port ;
00010 char *dest ;
00011 int i ;
00012
00013 if(argc == 1) {
00014 port = 8006 ;
00015 dest = "172.16.0.1" ;
00016 }
00017 else {
00018 port = atoi(argv[1]) ;
00019 dest = RTS_LOG_HOST ;
00020 }
00021
00022
00023
00024 printf("Default destination is -%s-, port %d\n",RTS_LOG_HOST,RTS_LOG_PORT) ;
00025
00026 rtsLogLevel(DBG) ;
00027 rtsLogAddDest(dest,port) ;
00028 printf("Destination -%s-, port %d\n",dest,port) ;
00029
00030 for(i=0;i<10000;i++) {
00031 LOG(DBG,"Testing log facility %u",i) ;
00032 }
00033
00034 LOG(WARN,"This should be warning...",0,0,0,0,0) ;
00035 LOG(CRIT,"This is really critical...",0,0,0,0,0) ;
00036
00037 return 0 ;
00038 }
00039