On Sat, Mar 22, 2003 at 12:18:27PM -0600, Manoj Srivastava wrote: > >> On Mon, 18 Nov 2002 10:48:55 +0100, > >> Javier Fernández-Sanguino Peña <jfs@computer.org> said: > > > However, even if it's common sense, it might be necessary to > > introduce also a convention regarding error checking and > > logging. > > Don't we already have /var/log as a recommended place for > logging? Yes. But it would be nice for every script to log in the same place rather than to have 10+ small files in /var/log (one for each script). > > IMHO the policy should mandate that error checking be done and any > > errors be sent in "not verbose" format to the console (...failed) > > and in verbose format to some log (which should be of course > > logrotated but that'0s another issue). > > I don't think this should be in policy. Why should the > package not be able to use debconf to ask the user what to do, and > provide details on request? Well. I believe that something on the lines of: "init scripts should report a proper failure state (..failed) when they abort for some reasons. Detailed information on the error should not be sent to the console (since it will not be seen by an admin unless he is there at the moment) but logged to /var/log/init.d.err)" > > I think the developer's common sense should be allowed to > determine what is the best course. We should tell developers where to log this errors. Otherwise it would be a mess for admins. Imagine the system has not booted properly, where do I look for the errors during init? In wherever the maintainer wishes too or in a specific place. It's the same as with /var/log/dmesg. If I want to see what happened to the kernel after reboot I can take a look at that file, bootmisc.sh takes care of that. > > However, ignoring errors silently is a bug, and should be > reported as such. Agreed. > > > The location of this log (/var/log/messages or a new one > > /var/log/init.d.log?) should be specified in this policy too. Any > > errors/messages from the init.d scripts should be sent there. This > > makes it easier for users to know why a given service has failed in > > case the system starts up unattended (and thus nobody looks at the > > console) or it lacks console at all. > > I don't agree. Why can't I send log messagesot, say, > /var/log/gnus_install.log ? Why does it need to go through syslog? > This smacks of micromanagement. > Because having 50+ files in /var/log/ is a pain for the admin? Also, you lose ordering of events if you log to 50+ files instead of a common file. Why is /var/log/init.d.log (or .err) such a bad idea? Regards Javi
Attachment:
pgpn9P2Q5cuuR.pgp
Description: PGP signature