Re: Best practices for logging from a Windows service - Mailing list pgsql-admin

From Magnus Hagander
Subject Re: Best practices for logging from a Windows service
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE92E85C@algol.sollentuna.se
Whole thread Raw
In response to Best practices for logging from a Windows service  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-admin
> I am looking for advice on how best to configure logging from
> PostgreSQL when it is run as a Windows service.  Under Linux
> we allow it to log to 'stderr' and we use the pg_ctl -l
> switch to direct that to a file.  This doesn't seem to be
> supported under Windows, so I'm looking for "best practices"
> advice from those experienced in this area.

If you expect to analyze the logs specifically for postgresql, use log
to file and set redirect_stderr (this is the default by the MSI
installer). This will create files in the pg_log directory.

If you want to integrate with existing log analyzers etc for windows,
set it for eventlog. This is harder if you want to do a specific
analyzer, but it'll integrate nicely with pre-existing stuff.

//Magnus

pgsql-admin by date:

Previous
From: "josh@segrestfarms.com"
Date:
Subject: Restore a PG database in Windows
Next
From: Scott Marlowe
Date:
Subject: Re: Restore a PG database in Windows