How to write to syslog with external app? - SCO

This is a discussion on How to write to syslog with external app? - SCO ; All - I am familiar with the "logger" utility in Linux, which will write to syslog with whatever free-form text you want. Is there a similar utility or function in SCO? I have a utility that I want to run ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: How to write to syslog with external app?

  1. How to write to syslog with external app?

    All -

    I am familiar with the "logger" utility in Linux, which will write to
    syslog with whatever free-form text you want. Is there a similar
    utility or function in SCO? I have a utility that I want to run
    periodically, and I'd like the output to be logged via syslog. I've
    never liked writing to system log files directly in case syslog is in
    the middle of a write or something like that.

    Thanks!
    Thomas Cameron


  2. Re: How to write to syslog with external app?

    Thomas Cameron wrote:

    > I am familiar with the "logger" utility in Linux, which will write to
    > syslog with whatever free-form text you want. Is there a similar
    > utility or function in SCO?


    You can roll your own in perl using the Sys::Syslog module.

    JS

  3. Re: How to write to syslog with external app?

    Hrm - that would be great if I were a perl hacker. :-(

    Any other suggestions?

    TC


  4. Re: How to write to syslog with external app?

    In article <1122393210.464132.252760@g14g2000cwa.googlegroups. com>,
    Thomas Cameron wrote:
    >I am familiar with the "logger" utility in Linux, which will write to
    >syslog with whatever free-form text you want. Is there a similar
    >utility or function in SCO?


    /usr/bin/logger

    John
    --
    John DuBois spcecdt@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/

  5. Re: How to write to syslog with external app?

    Thomas Cameron wrote:
    > Hrm - that would be great if I were a perl hacker. :-(


    It's quite easy:

    #!/usr/bin/perl

    use Sys::Syslog;

    while (<>)
    {
    openlog($0, 'ndelay', 'local1');
    syslog('debug', "Writing STDIN: $_");
    closelog();
    }



    JS

  6. Re: How to write to syslog with external app?


    John DuBois wrote:
    > In article <1122393210.464132.252760@g14g2000cwa.googlegroups. com>,
    > Thomas Cameron wrote:
    > >I am familiar with the "logger" utility in Linux, which will write to
    > >syslog with whatever free-form text you want. Is there a similar
    > >utility or function in SCO?

    >
    > /usr/bin/logger
    >
    > John
    > --
    > John DuBois spcecdt@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/


    Many thanks, that was it.

    Thomas


+ Reply to Thread