Re: Best practices for logging from a Windows service

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Best practices for logging from a Windows service
Date: 2005-11-15 18:25:29
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE92E85C@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2005-11-15 18:28:46 Re: Restore a PG database in Windows
Previous Message josh@segrestfarms.com 2005-11-15 18:16:38 Restore a PG database in Windows