syslogging oddity

Started by Andrew Dunstanover 18 years ago7 messages
#1Andrew Dunstan
andrew@dunslane.net

Somewhere along the way we seem to have made the syslogger's shutdown
message go to stderr, even if we have redirected it:

[andrew@constanza inst.test.5703]$ bin/pg_ctl -D data/ -w stop
waiting for server to shut down....LOG: logger shutting down
done
server stopped

Not sure if this is something we should worry about. I don't recall it
happening previously.

cheers

andrew

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andrew Dunstan (#1)
Re: syslogging oddity

Andrew Dunstan <andrew@dunslane.net> writes:

Somewhere along the way we seem to have made the syslogger's shutdown
message go to stderr, even if we have redirected it:

I'm pretty sure it has done that all along; at least the design
intention is that messages generated by syslogger itself should go to
its stderr. (Else, if the logger is having trouble, you might never get
to find out why at all.)

It might be reasonable to reduce "logger shutting down" to DEBUG1
or so, now that the facility has been around for awhile.

regards, tom lane

#3Magnus Hagander
magnus@hagander.net
In reply to: Tom Lane (#2)
Re: syslogging oddity

On Sun, Jul 22, 2007 at 08:05:12PM -0400, Tom Lane wrote:

Andrew Dunstan <andrew@dunslane.net> writes:

Somewhere along the way we seem to have made the syslogger's shutdown
message go to stderr, even if we have redirected it:

I'm pretty sure it has done that all along; at least the design
intention is that messages generated by syslogger itself should go to
its stderr. (Else, if the logger is having trouble, you might never get
to find out why at all.)

Yeah, I think it's been that way all along.

It might be reasonable to reduce "logger shutting down" to DEBUG1
or so, now that the facility has been around for awhile.

+1.

For example, many windows system have *only* that message in the eventlog,
and nothing else... Which is kind of strange.

It could be interesting to have it write it *to the logfile* though, since
it'd then at least be in the same place as the others. As in special-casing
this one message, and just ignore logging it in case it fails. But think
we're fine just dropping the level.

//Magnus

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Magnus Hagander (#3)
Re: syslogging oddity

Magnus Hagander <magnus@hagander.net> writes:

It could be interesting to have it write it *to the logfile* though, since
it'd then at least be in the same place as the others.

It does that too, no?

regards, tom lane

#5Magnus Hagander
magnus@hagander.net
In reply to: Tom Lane (#4)
Re: syslogging oddity

On Mon, Jul 23, 2007 at 10:45:35AM -0400, Tom Lane wrote:

Magnus Hagander <magnus@hagander.net> writes:

It could be interesting to have it write it *to the logfile* though, since
it'd then at least be in the same place as the others.

It does that too, no?

Ok, I admit writing that without actually checking anything :-) The main
thing is that yes, I'd like to get it out of the eventlog.

//Magnus

#6Andrew Dunstan
andrew@dunslane.net
In reply to: Tom Lane (#4)
Re: syslogging oddity

Tom Lane wrote:

Magnus Hagander <magnus@hagander.net> writes:

It could be interesting to have it write it *to the logfile* though, since
it'd then at least be in the same place as the others.

It does that too, no?

Yes, but if we make the message DEBUG1 it won't normally. Still, I think
we could live with that. I'm not inclined to waste too much time on it.

cheers

andrew

#7Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andrew Dunstan (#6)
Re: syslogging oddity

Andrew Dunstan <andrew@dunslane.net> writes:

Yes, but if we make the message DEBUG1 it won't normally. Still, I think
we could live with that. I'm not inclined to waste too much time on it.

Yeah. I think the only reason it was LOG initially was because the
syslogger was pretty experimental at the time.

regards, tom lane