Обсуждение: no more /var/log/postgres.log in latest debian package?
Hello,
In debian's latest postgresql (7.1.3-7) package debugging is no longer
sent to /var/log/postgresql.log which is annoying as it pollutes the
syslog with tons of extraneous data.
I tried using a /etc/syslog.conf directive of
postgresql.* /var/log/postgresql.log
and
*.local0 /var/log/postgresql.log
but it does nothing.
Thanks in advance for any suggestion,
--
PHEDRE: Mais quelque juste orgueil qu'inspire un sang si beau,
Le crime d'une mère est un pesant fardeau.
(Phèdre, J-B Racine, acte 3, scène 3)
On Fri, Feb 08, 2002 at 02:28:04AM -0800, Jeff Davis wrote:
> Edit /etc/postgresql/postgresql.conf and set syslog = 0
> if syslog = 2 then it goes to syslog (I believe that's the default for debian)
> if syslog = 1 then I think it goes to both syslog and stdout
> if syslog = 0 it doesn't go into syslog at all, only stdout
>
> Then make sure that pg_ctl is passed the "-l" option (that's a lowercase L)
> so that it sends the stdout to the correct file. I added:
> POSTGRES_LOG=/var/log/postgres.log
> to /usr/lib/postgresql/bin/postgresql-startup. It certainly seems as though
> there should be an easier way, doesn't it? Maybe there is a better way to
> pass it as an environment variable. Anyway, I guess that isn't too bad. It
> gets the output in the right file. I hope they make it cleaner for the 7.2
> packages.
Thanks a lot it works fine now!
--
THESEE: Mais l'ingrat toutefois ne m'est point échappé.
Une immortelle main de sa perte est chargée.
(Phèdre, J-B Racine, acte 4, scène 4)
Edit /etc/postgresql/postgresql.conf and set syslog = 0
if syslog = 2 then it goes to syslog (I believe that's the default for debian)
if syslog = 1 then I think it goes to both syslog and stdout
if syslog = 0 it doesn't go into syslog at all, only stdout
Then make sure that pg_ctl is passed the "-l" option (that's a lowercase L)
so that it sends the stdout to the correct file. I added:
POSTGRES_LOG=/var/log/postgres.log
to /usr/lib/postgresql/bin/postgresql-startup. It certainly seems as though
there should be an easier way, doesn't it? Maybe there is a better way to
pass it as an environment variable. Anyway, I guess that isn't too bad. It
gets the output in the right file. I hope they make it cleaner for the 7.2
packages.
Let me know if you find a better way.
Regards,
Jeff
On Friday 08 February 2002 01:23 am, you wrote:
> Hello,
>
> In debian's latest postgresql (7.1.3-7) package debugging is no longer
> sent to /var/log/postgresql.log which is annoying as it pollutes the
> syslog with tons of extraneous data.
>
> I tried using a /etc/syslog.conf directive of
>
> postgresql.* /var/log/postgresql.log
>
> and
>
> *.local0 /var/log/postgresql.log
>
> but it does nothing.
>
> Thanks in advance for any suggestion,
On fre, feb 08, 2002 at 02:28:04 -0800, Jeff Davis wrote: > Edit /etc/postgresql/postgresql.conf and set syslog = 0 > if syslog = 2 then it goes to syslog (I believe that's the default for debian) > if syslog = 1 then I think it goes to both syslog and stdout > if syslog = 0 it doesn't go into syslog at all, only stdout > > Then make sure that pg_ctl is passed the "-l" option (that's a lowercase L) > so that it sends the stdout to the correct file. I added: > POSTGRES_LOG=/var/log/postgres.log > to /usr/lib/postgresql/bin/postgresql-startup. It certainly seems as though > there should be an easier way, doesn't it? Maybe there is a better way to > pass it as an environment variable. Anyway, I guess that isn't too bad. It > gets the output in the right file. I hope they make it cleaner for the 7.2 > packages. > > Let me know if you find a better way. > I missed most of this thread so I hope I'm not repeating something here. There's an outcommented line in /etc/postgresql/postmaster.conf file: # POSTGRES_LOG=/var/log/postgres.log Removing the # has the same effect as what you describe above, but you don't have to alter a script that's overwritten on the next upgrade. Maybe postmaster.conf is not marked as a config file in the package, so it get's overwritten when upgrading? If so maybe one should file a bug report? /Daniel