Subject: Re: logger issue
To: Martin Weber <Ephaeton@gmx.net>
From: Andrew Brown <atatat@atatdot.net>
List: netbsd-help
Date: 07/26/2001 20:32:02
>Is there a way to have logger put the pid of it's parent process into its tag 
>? As far as I can see if you use no tag, it prints its own pid. If you use a 
>tag, you get no pid at all. But if I want to log from a say, script, I'd like 
>to have the scripts pid, not that of logger itself, as it's long way dead 
>when I read the entry in syslog.

ppid=`ps -oppid -p$$ | tail -1`
tag="mytag[$ppid]"
logger -t "$tag" -p what.ever ta-da!

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."