Re: log format

2001-07-17 Thread Lukas Beeler

log to syslog, using "logger"
edit your
/service/qmail-*/log/run file
my file looks like this

/service/qmail-smtpd/log/run
#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/bin/logger -t qsmtpd -p mail.info

yes, i know logger isn't reliable and so on, but iam not hosting anything 
important, sending and receiving only my mail.. splogger does add a 
timestamp before the normal log line, which i think isnt very useful 
because syslogd also adds a human readable timestamp..


At 12:11 17.07.2001 -0300, you wrote:
>Hi all.
>
>I'm using qmail-1.03, and it's working ok.
>Yesterday, I change the way to start qmail from tarball/INSTALL docs
>to LWQ. The problem is that the logs don't says (in human readable
>format), the date and time of each event. Instead of that, I see
>lines like
>
>@40003b535a1736077d54 tcpserver: ok 7541 0:10.1.1.1:25 :10.1.1.194::2525
>
>How can I configure qmail startup process to log the events date and
>time like syslog? (Jul 17 12:03:00 host process: blah, blah, blah...)
>
>thanks
>
>--ejg

-- 
Lukas "Maverick" Beeler / Telematiker
Project: D.R.E.A.M / every.de - Your Community
Web: http://www.projectdream.org
Mail: [EMAIL PROTECTED]




Re: log format

2001-07-17 Thread Kjetil Ødegaard

* GARGIULO Eduardo INGDESI <[EMAIL PROTECTED]>
>
> Hi all.
> 
> I'm using qmail-1.03, and it's working ok.
> Yesterday, I change the way to start qmail from tarball/INSTALL docs
> to LWQ. The problem is that the logs don't says (in human readable
> format), the date and time of each event. Instead of that, I see
> lines like 
> 
> @40003b535a1736077d54 tcpserver: ok 7541 0:10.1.1.1:25 :10.1.1.194::2525
> 
> How can I configure qmail startup process to log the events date and
> time like syslog? (Jul 17 12:03:00 host process: blah, blah, blah...)

As others have pointed out, you should use tai64nlocal from the
daemontools package to convert these timestamps.

If you use GNU less for viewing logs, see

  http://www.orakel.ntnu.no/~kjetilod/tips/

for instructions on how to do this conversion automatically.

-- 
Kjetil



Re: log format

2001-07-17 Thread pop corn

>   http://www.orakel.ntnu.no/~kjetilod/tips/

Terrific tip! this is how I got it to work on Redhat 7.0:

# pwd
/usr/bin
# diff lesspipe.sh lesspipe.sh.orig
< \@*.s) tai64nlocal < "$1" ;;
< # http://www.orakel.ntnu.no/~kjetilod/tips/
# export LESSOPEN="|/usr/bin/lesspipe.sh %s"


_
Get your FREE download of MSN Explorer at http://explorer.msn.com




Re: log format

2001-07-17 Thread Kjetil Ødegaard

* pop corn <[EMAIL PROTECTED]>
>
> >   http://www.orakel.ntnu.no/~kjetilod/tips/
> 
> Terrific tip! this is how I got it to work on Redhat 7.0:
> 
> # pwd
> /usr/bin
> # diff lesspipe.sh lesspipe.sh.orig
> < \@*.s) tai64nlocal < "$1" ;;
> < # http://www.orakel.ntnu.no/~kjetilod/tips/
> # export LESSOPEN="|/usr/bin/lesspipe.sh %s"

You should probably save your modified lesspipe.sh in ~/bin; otherwise
it might be lost in an upgrade.

I have added a paragraph for Red Hat users.  If anyone has information
about lesspipe on other platforms, email me and I'll add them.

-- 
Kjetil



Re: log format

2001-07-17 Thread Gary MacKay

I've tried this several different times on my RH machine but it never
worked. Checked paths, perms, etc. No luck. Well, I just got it
working!! I had to remove the \@ from the \@*.s line and it works like a
charm. I'm guessing it's a shell thing?

- Gary


Kjetil Ødegaard wrote:
> 
> * pop corn <[EMAIL PROTECTED]>
> >
> > >   http://www.orakel.ntnu.no/~kjetilod/tips/
> >
> > Terrific tip! this is how I got it to work on Redhat 7.0:
> >
> > # pwd
> > /usr/bin
> > # diff lesspipe.sh lesspipe.sh.orig
> > < \@*.s) tai64nlocal < "$1" ;;
> > < # http://www.orakel.ntnu.no/~kjetilod/tips/
> > # export LESSOPEN="|/usr/bin/lesspipe.sh %s"
> 
> You should probably save your modified lesspipe.sh in ~/bin; otherwise
> it might be lost in an upgrade.
> 
> I have added a paragraph for Red Hat users.  If anyone has information
> about lesspipe on other platforms, email me and I'll add them.
> 
> --
> Kjetil



Re: log format

2001-07-17 Thread pop corn

That's a good point. I also put the info in a separate install doc that I 
maintain for myself.

I should add that I had to add another entry to make it work for the 
"current" file:

current) tai64nlocal < "$1" ;;


>From: Kjetil Ødegaard <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: log format
>Date: Tue, 17 Jul 2001 19:35:22 +0200
>
>* pop corn <[EMAIL PROTECTED]>
> >
> > >   http://www.orakel.ntnu.no/~kjetilod/tips/
> >
> > Terrific tip! this is how I got it to work on Redhat 7.0:
> >
> > # pwd
> > /usr/bin
> > # diff lesspipe.sh lesspipe.sh.orig
> > < \@*.s) tai64nlocal < "$1" ;;
> > < # http://www.orakel.ntnu.no/~kjetilod/tips/
> > # export LESSOPEN="|/usr/bin/lesspipe.sh %s"
>
>You should probably save your modified lesspipe.sh in ~/bin; otherwise
>it might be lost in an upgrade.
>
>I have added a paragraph for Red Hat users.  If anyone has information
>about lesspipe on other platforms, email me and I'll add them.
>
>--
>Kjetil

_
Get your FREE download of MSN Explorer at http://explorer.msn.com