supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Gerrit Pape <pape@smarden.org>
Subject: Re: Help needed on svlogd pattern match
Date: Mon, 19 Dec 2005 10:27:58 +0100	[thread overview]
Message-ID: <20051219092758.29772.qmail@d6b977da400810.315fe32.mid.smarden.org> (raw)
In-Reply-To: <e69cdf2f0512182059p21265f15t8f0cf40eca879cca@mail.gmail.com>

On Mon, Dec 19, 2005 at 10:29:50AM +0530, Rajkumar s wrote:
>          For a quiet sometime we had been using svlogd for log
> processing, I need some help regarding matching some pattern in the
> log files and that needs to be logged in seperately in another log
> file.
> 
> eg:
> 
> timestamp rcpt:-:not valid sender
> timestamp rcpt:+:valid email-id
> timestamp rcpt:-:not valid recipient
> 
> I need only the + lines ie., "timestamp rcpt:+:valid email-id" to be
> logged in seperately
> 
> The Config file is shown below
> s100000
> n5
> -*
> +rcpt:+*
> 
> But this doesn't work , Kindly help me out to log messages seperately.

A plus in the pattern has a special meaning with svlogd, see the man
page.  You cannot match a single plus character, only one or more.  This
pattern should work:

 $ mkdir foo
 $ echo 'ercpt:++:*' >foo/config
 $ svlogd -tt foo <<EOT
 rcpt:-:not valid recipient
 rcpt:+:valid email-id
 EOT
 2005-12-19_09:27:29.02106 rcpt:+:valid email-id
 $ cat foo/current
 2005-12-19_09:27:29.02102 rcpt:-:not valid recipient
 2005-12-19_09:27:29.02106 rcpt:+:valid email-id
 $ 

Regards, Gerrit.


  parent reply	other threads:[~2005-12-19  9:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-19  4:59 Rajkumar s
2005-12-19  9:04 ` Rafal Bisingier
2005-12-19  9:27 ` Gerrit Pape [this message]
2005-12-29 11:17   ` Rajkumar s
2006-01-08 22:35 ` pauld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051219092758.29772.qmail@d6b977da400810.315fe32.mid.smarden.org \
    --to=pape@smarden.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).