how to use perl print msg to syslog?

how to use perl print msg to syslog?

Post by Sam Wu » Thu, 11 Jan 2001 14:04:36



Hi,

I want to use perl script to print msg to syslog.
Does anyone have example?

Thanks

 
 
 

how to use perl print msg to syslog?

Post by Sam Wu » Thu, 11 Jan 2001 14:05:41


The following example doesn't print the msg to the /var/log/messages.

#!/usr/bin/perl

use Sys::Syslog;
use Socket;

openlog("testlog", "1", "daemon");
syslog("notice", "hellooooo");
closelog();

Thanks
Sam


> Hi,

> I want to use perl script to print msg to syslog.
> Does anyone have example?


 
 
 

1. Printing in Landscape from Perl using systen()

G' Day

I have got a little issue with a script that refuses to print a text
file in landscape, on a SOLARIS 5.9.
Therefore, I hope I could get a little help from here?

I am using the following PERL code. The code within the "system"
command is working  (meaning: printing landscape) for shell scripts I
am using.

[...] (paths are masked for this posting)

  system
  ("
    [..]/laserjet/laserjet -landscape -courier_10 -lines-per-inch 13
    lp -d printername textfilename
    [..]/laserjet/laserjet -reset"
  );

[...]

Regards,
Oliver

2. Small configuration problem on SLS 1.3 (Solution)

3. How can I prevent this msg in syslog?

4. How to set the Motherboard to the Chip/Jumper

5. what is this /usr/sbin/nmbd error msg in syslog about??

6. Network Everywhere (but Linux) NC100 Version 2.1: Does this work at all with Linux ?

7. scoping HW messages by syslog msg categories

8. test n/m

9. Why does sendmail write syslog msg in GMT

10. syslog to send msg to last user in printer queue

11. syslog msg- modeprobe: Can't locate module char-major-14, how to fix?

12. syslog msg: SCSI transport failed

13. strange bind msg in syslog.. help