Thread: Admin pack's "logfile" doesn't work

Admin pack's "logfile" doesn't work

From
"Andy Shellam (Mailing Lists)"
Date:
<font size="-1"><font face="Arial">Hi,<br /><br /> I have PgAdmin 1.6.2 talking to a PostgreSQL 8.2.3 server with the
distributedadmin pack installed (from source's contrib/adminpack), and have ran the adminpack.sql script against the
postgresdatabase.  If, in PgAdmin, I click Tools > Server Status and select the "logfile" tab, I get the following
error:<br/><br /> "redirect_stderr not enabled or log_filename misconfigured."<br /><br /> My PostgreSQL server is
configuredas follows:<br /><br /> silent_mode --- on<br /> log_destination --- stderr<br /> log_directory ---
/var/log/pgsql<br/> log_filename --- postgresql.%Y%m%d.log<br /> log_rotation_age --- 1d<br /> redirect_stderr ---
on<br/><br /> I've tried it with silent_mode set to "off" and stopped/started PostgreSQL, but it still doesn't work.<br
/><br/> Is there anything else I need to check/change to get PgAdmin reading the log file?  Obviously the log is
readable/writeableto the postgresql user account, and is around 400KB per day.<br /><br /> Thanks,<br /><br />
Andy.</font></font>

Re: Admin pack's "logfile" doesn't work

From
Dave Page
Date:
Andy Shellam (Mailing Lists) wrote:
> Hi,
> 
> I have PgAdmin 1.6.2 talking to a PostgreSQL 8.2.3 server with the
> distributed admin pack installed (from source's contrib/adminpack), and
> have ran the adminpack.sql script against the postgres database.  If, in
> PgAdmin, I click Tools > Server Status and select the "logfile" tab, I
> get the following error:
> 
> "redirect_stderr not enabled or log_filename misconfigured."
> 
> My PostgreSQL server is configured as follows:
> 
> silent_mode --- on
> log_destination --- stderr
> log_directory --- /var/log/pgsql
> log_filename --- postgresql.%Y%m%d.log
> log_rotation_age --- 1d
> redirect_stderr --- on
> 
> I've tried it with silent_mode set to "off" and stopped/started
> PostgreSQL, but it still doesn't work.
> 
> Is there anything else I need to check/change to get PgAdmin reading the
> log file?  Obviously the log is readable/writeable to the postgresql
> user account, and is around 400KB per day.

It's a bit stupid about the filename format - try the default of:

postgresql-%Y-%m-%d_%H%M%S.log

and it should work.

Regards, Dave.