Hi all,

I sent this message to the beginners mail list. As yet, I have not received any answer. So, I repeat my query here.
 

I am working on a Intel PIII running RedHat 7.2 having perl5.6.0 which
was installed along with the OS. I have copied an example
program as follows:

-------------------------------------------------------------------------------

#!/usr/bin/perl -w

use Sys::Syslog;                            #Misses setlogsock
use Sys::Syslog qw(:DEFAULT setlogsock);    #Also gets setlogsock

openlog($0, 'cons,ndelay,pid', 'user');
print "program: $0\n";
syslog('info', 'this is another test');
syslog('mail|warning', 'this is a better test: %d', time);
closelog();

print "problem was $!\n";

-------------------------------------------------------------------------------

When I execute the program, I get the following output:

program: ./syslog.pl
problem was Bad file descriptor

There is no output on the screen or any of the /var/log files. The

/etc/syslog.conf file is as follow:

# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.*                                                 /dev/console

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;news.none;authpriv.none;cron.none
/var/log/messages

# The authpriv file has restricted access.
authpriv.*                                              /var/log/secure

# Log all the mail messages in one place.
mail.*                                                  /var/log/maillog

# Log all the warning messages in one place.
*.warn                                                  /var/log/syslog
 

# Log cron stuff
cron.*                                                  /var/log/cron

# Everybody gets emergency messages, plus log them on another
# machine.
*.emerg                                                 *

# Save mail and news errors of level err and higher in a
# special file.
uucp,news.crit                                          /var/log/spooler

# Save boot messages also to boot.log
local7.*
/var/log/boot.log

#
# INN
#
news.=crit
/var/log/news/news.crit
news.=err                                         /var/log/news/news.err

news.notice
/var/log/news/news.notice

Any help will be greatly appreciated.

Best regards,
Supratik Mukhopadhyay

-- 
Supratik Mukhopadhyay
Associate Professor

Experimental High Energy Physics Division     !    ALICE (EP)
Saha Institute of Nuclear Physics             !    Bat.26, Rm. 025
1/AF, Sector - 1, Bidhannagar                 !    CERN
Calcutta 700064, West Bengal                  !    CH-1211, Geneve 23
INDIA                                         !    Switzerland

Phone: 0091-33-337-0379 (Ext. 781)            !    Ph. - +41 22 76 76580
Fax: 0091-33-337-4637
 

Reply via email to