Re: [logs] logger clone for Windows?

From: Sweth Chandramouli (loganalysisat_private)
Date: Mon Apr 08 2002 - 23:31:00 PDT

  • Next message: Andrew_Stephenat_private: "[logs] Syslog client for NetWare"

    On Tue, Apr 09, 2002 at 10:58:00AM +0800, bretwatsonat_private wrote:
    > THis is probably going to be a stupid question.... but I'm looking for a
    > "logger" replacement for Windows...
    > 
    > Basically I have a conventional flatfile log from an app (peoplesoft) which
    > I want to tail -f | logger to so that it will feed into the event log, from
    > there I have no problems squirting it across into my central log.
    	If you can get your hands on a copy of the appropriate
    resource kit, you can use the logevent tool, which is the the Windows
    version of logger.  To push data from existing (closed) files to the
    event log you can do something like
    
    @echo off
    for /F "delims=" %%L in (file1 file2 file3) logevent -e -c 12345 %%L
    
    	, which will log the line as event category 12345 to the
    Application Log.  Change the %%L to %L if you are doing this from the
    command line rather than a batch script; also, there's no way to log
    messages to the other two Windows logs using logevent; to do that, you'd
    need to write a script in a language like Perl that can access the EL
    API directly.  Actually, looking back at your request, you want to
    duplicate tail -f, which you can't do with standalone apps if you don't
    have something like Cygwin or MKS installed to provide the tail binary,
    in which case you'll need to use something like Perl anyways.
    
    	-- Sweth.
    
    -- 
    Sweth Chandramouli      Idiopathic Systems Consulting
    svcat_private      http://www.idiopathic.net/
    
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: loganalysis-unsubscribeat_private
    For additional commands, e-mail: loganalysis-helpat_private
    



    This archive was generated by hypermail 2b30 : Wed Apr 10 2002 - 11:35:26 PDT