Re: PROPOSAL: dpkg-logger and related
On Fri, Jan 08, 1999 at 03:07:55PM +0100, Martin Bialasinski wrote:
> What change is necessary to output to stderr in a sh script ? Is it
> that difficult (I practically know nil about shell programming)?
> stdout is easy, as you don't have to change anything. I just know
> perl, and this is plain easy in perl.
It's not so much what as 'how much'. Doing this is relatively easy. If we
are just talking about stdout and stderr, that would be easy as well.
> BC> Dpkg would also have to be patched up a great deal and this still
> BC> doesn't even cover where the logging should go. If the logging is
> BC> internal in dpkg, that's one more thing to break under dpkg, and
> BC> one more thing that can't be seperated from it. There would be no way
> BC> for alternate logging solutions to be enabled.
> There is. dpkg would catch the output and feed it to the prefered
> dpkg-logger. So basically, the result is like calling dpkg-logger
> directly, but without the need to change the *inst scripts.
When explained this way, I can understand the pro's of using dpkg to do
the logging. As it was explained before, I wasn't sure of the benefits
Getting dpkg to call dpkg-logger is a viable solution using the scripts
stdout and stderr descriptors. It would also allow dpkg to fill in the
blank for the package name on the dpkg-logger command line args. And your
right that the plus side is not having to modify the package scripts
(except that maintainers may want to add stderr as an output option for
certain messages) and it would wipe out dpkg logging and package logging
in one bang.
The only draw back I see to this is that it would require modifying dpkg
code. I'll look into this and see what Ian thinks of the patch as well as
posting it here.
----- -- - -------- --------- ---- ------- ----- - - --- --------
Ben Collins <firstname.lastname@example.org> Debian GNU/Linux
UnixGroup Admin - Jordan Systems Inc. email@example.com
------ -- ----- - - ------- ------- -- The Choice of the GNU Generation