[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GOP-PROP 5: build system output
From: |
Matthias Kilian |
Subject: |
Re: GOP-PROP 5: build system output |
Date: |
Thu, 7 Jul 2011 15:40:26 +0200 |
User-agent: |
Mutt/1.4.2.3i |
On Thu, Jul 07, 2011 at 02:59:37PM +0200, Matthias Kilian wrote:
> Wouldn't it be better to either collect both stdout and stderr in
> the same log file or to use three log files .err.log, .out.log and
> .log, where the latter contains the combined streams? Otherwise you are
> loosing the context between the two, which sometimes may be important.
Little bit difficult as it seems, so here's a simple version (without
the combined log). You can invoke it like this:
lilylog.sh o.log e.log ls -l . dontexist
which is the `verbose' mode (i.e. you still see stdout and stderr, but
both get logged to the given files) or like this:
lilylog.sh -q o.log e.log ls -l . dontexist
which is the `quiet' mode (output goes only to the files).
If the command given fails (exit code != 0) so does this script.
In addition, it writes (to stderr) the command that failed and the
logfiles.
Ciao,
Kili
ps: i usually use tabs in my scripts, but as you guys obviously
consider tabs evil, i've run expand(1) on it ;-)
lilylog.sh
Description: Bourne shell script