[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Logs-devel] write to filename

From: Jim Prewett
Subject: [Logs-devel] write to filename
Date: Sun, 10 Sep 2006 06:31:47 -0600 (MDT)

Hi Vijay,

I'm getting stuck!

I want to write a rule that separates messages into files by service.  
Messages from syslogd go to the syslogd file, sshd the sshd file, etc.

The problem is, I don't want to have the files just go to whatever the PWD 
is, I want to be a little more specific than that.  I want to use the 
variable that I bind in the match function, SERVICE, to generate the name 
of the file to write to.  

This rule should do what I want:

  named 'logfile-splitter
  matching regexp "(?:\\S+ ){4}(\\w+)"
  binding (SERVICE)
  (lambda (message)
      (format () "/Users/dl/logs-work/split/~A" SERVICE)

Do you have any ideas on how could we add this to the RDL?  (aka. make 
this easier to write)

Another, very simular, rule I'd like to write would divide the logfile up 
by host by service.

Thanks for any thoughts you might have,

James E. Prewett                    address@hidden address@hidden 
Systems Team Leader           LoGS: http://www.hpc.unm.edu/~download/LoGS/ 
Designated Security Officer         OpenPGP key: pub 1024D/31816D93    
HPC Systems Engineer III   UNM HPC  505.277.8210

reply via email to

[Prev in Thread] Current Thread [Next in Thread]