logs-devel
[Top][All Lists]
Advanced

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

[Logs-devel] Re: LoGS roadmap(ish)


From: Vijay Lakshminarayanan
Subject: [Logs-devel] Re: LoGS roadmap(ish)
Date: Sun, 11 Jun 2006 21:21:20 -0500

On 6/11/06, Jim Prewett <address@hidden> wrote:

> > I don't like the semantics of 'matching "abc" and "def"'; I would have
> > that mean instead 'matches regexp "abc" and matches regexp "def"'.  So, a
> > matching pattern could be "abcdef" or "defabc" or "abc hello def" ...
> >
> > I can't honestly think of a time where I would want that to mean match the
> > concatenation of two (N) regexps.  :)
> >
> > To make the example a little more concrete; I may want to match an SSH
> > message that indicates that user 'vijay' has logged in: 'matching "vijay"
> > and "sshd"' or some such thing.
>
> All right.  I've changed it now.  All regexps are OR'd.  When I first
> wrote it, my only thought was: this way we can break long regexps over
> lines.  So [matches regexp "abc" and matches "def"] results in
>
> "(abc)|(def)".

I think you're closer, but I still don't think I like the behaviour.  I
would expect matches "abc" and matches "def" to produce code that would
expand to something like:

(lambda (message)
  (and
    (cl-ppcre:scan "abc" (message message))
    (cl-ppcre:scan "def" (message message))))

I'm thinking I'd want to say something like:
matches "sshd" and matches "login failed"
        doing #'alert-jim-to-login-failure


This too is done :-)  I was taking a look at ASDF-INSTALL.  It seems
complicated but it is one of those things we must do to make life easy
for the masses.

I myself use ASDF to load LoGS everytime (since SBCL includes it by default).

If it is all right with you, shall I add a file named "cl-cli.asd" to
the repository?  I have one on my disk and I copy it each and every
time I check out the latest version.  It'll be better to just add it
to the repository, IMO.

Here's the file.  It is a severely stripped down version of logs.asd :)

;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
(defsystem "cl-cli"
   :description "Command line processing utility"
   :version "0.0.1-pre"
   :author "James E. Prewett <address@hidden>"
   :licence "GPL"
   :depends-on ()
   :components ((:file "cl-cli")))

I took the version number from cl-cli-version

Thanks Jim
Vijay




reply via email to

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