Hi!!
I'm sorry for the question...

OS of my computer is Redhat6.0, all setting is default.
Below is my program(mylog.pl):
**********************************************************************
#! /usr/bin/perl

use Sys::Syslog;

openlog('MYPROG', 'cons,pid', 'user') || warn "openlog() failed.\n";
syslog('info', 'logTest') || warn "syslog() failed.\n";
syslog('info', 'logTest') || warn "syslog(2) failed.\n";
syslog('warning', 'Something happened') || warn "syslog(3) failed.\n";
syslog('warning', 'Something happened') || warn "syslog(4) failed.\n";
closelog() || warn "closelog() failed.\n";

print "ok\n";

***********************************************************************

result is :
***********************************************************************
[root@xiao test]#perl mylog.pl > mylog.pl.result
openlog() failed.
<user.info>MYPROG[860]: logTest
<user.warning>MYPROG[860]: Something happened
closelog() failed.
[root@xiao test]#cat mylog.pl.result
ok
[root@xiao test]#
***********************************************************************

I couldn't found those log in any file, the echo is strange. 
I think my program is wrong.
How should I use thoes funtions.

Thanks in advance

                                        vjian            
               [EMAIL PROTECTED]


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Reply via email to