"Magnus Hagander" <mha@sollentuna.net> writes:
> * Created function write_stderr(const char *fmt, ...), used before elog
> can be used. This function will write to stderr on unix and on win32
> fconsole. It will write to the eventlog on win32 when running as a
> service.
> * Changed all (most? I think I got all) fprintf(stderr,...) to use this
> function instead. That way, we gain the ability to put all the other
> preivously-stderr-messages to the eventlog as well.
I'm not sure this is a good idea. The remaining uses of stderr were
that way for a reason, not because someone had forgot to change them
into elog calls. It would be a lot less invasive to just move the
privilege check as you originally intended.
regards, tom lane