Folks,
I'm curious as to what people here would recommend for parsing
syslog output.
A few years ago, I wrote a script in perl to parse syslog messages
where the text of the message was in an application specific
format. I did not use regexs for this parser, but, instead parsed
the line statefully.
Recently, I found a perl module for parsing syslog output that tries
to be more general than mine was and it uses regexs to try to
accomplish this.
If you were writing such a module in CL, would you use something
like CL-PPCRE regexs?
--jon
Jon Boone wrote:
> Folks,
>
> I'm curious as to what people here would recommend for parsing
> syslog output.
LoGS by Jim Prewett. http://savannah.nongnu.org/projects/logs/
> Recently, I found a perl module for parsing syslog output that tries
> to be more general than mine was and it uses regexs to try to
> accomplish this.
Which one?
> If you were writing such a module in CL, would you use something
> like CL-PPCRE regexs?
Yes. LoGS uses CL-PPCRE, as a matter of fact :-)
Cheers
Vijay
Jon Boone <········@delamancha.org> writes:
> Folks,
>
> I'm curious as to what people here would recommend for parsing
> syslog output.
>
> A few years ago, I wrote a script in perl to parse syslog messages
> where the text of the message was in an application specific
> format. I did not use regexs for this parser, but, instead parsed
> the line statefully.
>
> Recently, I found a perl module for parsing syslog output that tries
> to be more general than mine was and it uses regexs to try to
> accomplish this.
>
> If you were writing such a module in CL, would you use something
> like CL-PPCRE regexs?
Why? Don't your applications log sexps?
[···@thalassa nlp]$ sudo tail -200 /var/log/messages|grep matrix
May 12 06:00:39 thalassa matrix: (transaction begins :user (admin :name "Smith" :ip 10.0.0.142) :request (destroy :user (root :name "Neo"))
--
__Pascal Bourguignon__ http://www.informatimago.com/
Small brave carnivores
Kill pine cones and mosquitoes
Fear vacuum cleaner
Pascal Bourguignon <···@informatimago.com> writes:
> Why? Don't your applications log sexps?
Sadly, the applications are written by other people who don't care
to log in s-exp format.
--jon