On Tue, May 21, 2002 at 06:20:29PM +0800, henry wrote:
> Dear List:
> I try to dump messages from my program to some file of /var/log
> by inserting macro into my program as follows :
>
> #include<syslog.h>
>
> #define debug openlog("my_program",LOG_PID,LOG_USER); /
> syslog(LOG_INFO,"I send a message to log");
>
> But nothing happen ,Could someone shed some light on it ,Thanks.I suggest removing the #define debug from the start of the openlog line, and getting rid of the forward slash as well. #define debug openlog(...), just means "replace all occurrences of 'debug'[1] with openlog(...)", it doesn't actually do anything on its own. Cheers! :) d [1]: Yes, I know that it's nowhere *near* all occurrences ... -- Daniel Stone <[EMAIL PROTECTED]> http://raging.dropbear.id.au KDE Developer <[EMAIL PROTECTED]> http://www.kde.org Kopete: Multi-protocol IM client http://www.kdedevelopers.net/kopete/
msg23677/pgp00000.pgp
Description: PGP signature
