[pisa-src] r2591 - trunk/pisacd/pisacd.c

  • From: Fahad Aizaz <fahadaizaz@xxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Fri, 27 May 2011 16:43:56 +0200

Author: aizaz
Date: Fri May 27 16:43:55 2011
New Revision: 2591

Log:
Client logging modified

PISA client logs messages (debug, info, error etc) in two
ways:
1. When the pisa client is initiated in foreground mode
   the client logs these messaeges both on console and 
   syslog.
2. When the pisa client is initiated in background mode
   the client logs these messages in syslog only.

Modified:
   trunk/pisacd/pisacd.c

Modified: trunk/pisacd/pisacd.c
==============================================================================
--- trunk/pisacd/pisacd.c       Fri May 27 16:39:43 2011        (r2590)
+++ trunk/pisacd/pisacd.c       Fri May 27 16:43:55 2011        (r2591)
@@ -295,7 +295,10 @@
 
     /* daemonize pisacd when running background mode */
     if (cd_ctx.flag_background) {
+        pisa_set_logtype(PISA_LOGTYPE_SYSLOG);
         pisa_daemonize();
+    } else {
+        pisa_set_logtype(PISA_LOGTYPE_STDERR_SYSLOG);
     }
 
     /* Setup configuration file.
-- 
This is the pisa developer mailing list. Please also subscribe to the main pisa 
list at:
//www.freelists.org/list/pisa

Other related posts:

  • » [pisa-src] r2591 - trunk/pisacd/pisacd.c - Fahad Aizaz