Discussion:
[ADMIN] How can one prevent logging to the Windows event log?
(too old to reply)
David Schnur
2011-12-29 20:40:49 UTC
Permalink
I have log_destination = 'stderr', but Postgres (8.3.15) writes messages to
the Windows event log. How can I prevent it from doing this? Any insight
into this behavior would be greatly appreciated. Thanks!
raghu ram
2011-12-30 15:46:39 UTC
Permalink
Post by David Schnur
I have log_destination = 'stderr', but Postgres (8.3.15) writes messages
to the Windows event log. How can I prevent it from doing this? Any
insight into this behavior would be greatly appreciated. Thanks!
Modify below parameters in Postgresql.conf file :

log_destination = 'stderr'
logging_collector = on

And RESTART PostgreSQL cluster to apply these changes.

pg_ctl -D <Data directory Path> stop -m f

pg_ctl -D <Data directory Path> start

--Raghu
David Schnur
2011-12-30 17:28:05 UTC
Permalink
Ah, I see; it looks like when logging_collector = 'off', Postgres logs to
the Windows event log. Is this a bug? Given that log_destination has an
'eventlog' option, it seems weird for it to also be logging there based on
the value of a different option.

Since I don't want logging to files, I guess my solution will instead be to
set log_min_messages = 'panic'.

Thanks for pointing me in the right direction.
Post by David Schnur
log_destination = 'stderr'
logging_collector = on
Continue reading on narkive:
Loading...