On Sat, Mar 27, 2004 at 00:56:47 +0100,
Martin Pitt <martin(at)piware(dot)de> wrote:
> Well, daemons that run for a long time should not log to
> stdout/stderr, but to syslog. Otherwise they clutter up the screen
> randomly or the messages are not seen at all (when you are only
> working under X for example). pg_autovacuum already does that
> (/var/log/postgresql/autovacuum_log in Debian), so I don't see any
> reason why it should not log errors there, too.
Some people don't want to use syslog for logging for various reasons.
Logging to stdout is very attractive because your can pipe the output
to your favorite logging program.
> > If you don't want that ability you can redirect the stdin, stdout and
> > stderr yourself.
> I already thought about that, but if there's a startup problem with
> autovacumm then I would not see this as well, but I want that. An
> ideal daemon attempts to start and either writes an error to stderr
> why it cannot start, or detaches from its terminal when it started
I think you will find that there are a number people that will disaggree with
you about this. Why would the program write some errors only to stdout (or
stderr) and others to syslog? If the program were to always write errors to
syslog (and maybe copy them to stderr) you would find the error messages in
the logs even if the program was not able to fully start up.
> If pg_autovacuum logged everything to syslog, then immediate
> redirection would be possible (but not my favourite solution).
I am not sure what kind of logging the autovacuum deamon currently does.
I currently pipe the output from the postmaster to multilog to do my logging
and don't use syslog. I am not currently using the autovacuum daemon so
do not have examples of what it logs. However, I probably will use it in
the future and don't want it to be only usable with syslog.
In response to
pgsql-bugs by date
|Next:||From: Stephan Szabo||Date: 2004-03-27 16:43:18|
|Subject: Re: Fwd: Default pg_autovacuum config glitches|
|Previous:||From: Stephan Szabo||Date: 2004-03-27 03:55:46|
|Subject: Re: BUG #1117: Time calculation from epoch is 12 hours out|