Robin Bowes wrote:
Charlie Brady wrote:
On Tue, 23 Aug 2005, Robin Bowes wrote:
In the pod for the logging/adaptive plugin, you suggest changing the
log run file to (something like):
#! /bin/sh
export LOGDIR=./main
mkdir -p $LOGDIR/failed
exec multilog t n10 \
'-*` *' $LOGDIR/detailed \
'-*' '+*` *' $LOGDIR/accepted
This seems not quite right.
Why are you creating $LOGDIR/failed ?
Why are you not creating $LOGDIR/detailed and $LOGDIR/accepted ?
Sloppy editing (this isn't what I am actually running in production). I was
originally creating only a single directory and keeping the rest of the log
lines at the top level. I'll correct the code in the repository when I get the
chance.
I'd add:
Why is multilog running as root when it doesn't have to?
Good point. My production server runs setuidgid.
Here, I was just being lazy (and again this isn't the way it runs in
production). I should note that I don't see the need to have an independent uid
for each and every multilog instance (I usually set the machines up to use
Gmultilog as the user for every managed log).
Why is LOGDIR exported?
Also a good point.
Doesn't really matter. It is only exported for the environment of the current
process. If the exec'd code was expected to be able to see this ENV variable,
it would have to be exported anyways. In this case, the expansion happens in
the shell before the exec, but it doesn't hurt anything to have the export.
John (back from Israel and trying to catch up)