Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-admin by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group