Re: System Log

From: "Larry Rosenman" <ler(at)lerctr(dot)org>
To: "'Duncan Garland'" <duncan(dot)garland(at)ntlworld(dot)com>, "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: System Log
Date: 2007-03-09 17:25:45
Message-ID: 02d901c7626f$fed6cb50$fc8461f0$@org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

here is my line from a FreeBSD 6.2 system:
local0.* /var/log/pg-prod.log

and I add a local0.none to the /var/log/messages line so it doesn't get
spammed by the pg messages.

LER

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 512-248-2683 E-Mail: ler(at)lerctr(dot)org
US Mail: 430 Valona Loop, Round Rock, TX 78681-3893

-----Original Message-----
From: pgsql-novice-owner(at)postgresql(dot)org
[mailto:pgsql-novice-owner(at)postgresql(dot)org] On Behalf Of Duncan Garland
Sent: Friday, March 09, 2007 11:02 AM
To: Tom Lane
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] System Log

Hi Tom,

Thanks for the quick reply. I don't think the messages are configured to go
anywhere. Have you got a simple example I could copy? Or is there a simple
guide somewhere?

The current files is:

# $FreeBSD: src/etc/syslog.conf,v 1.13.2.3 2002/04/15 00:44:13 dougb Exp $
#
# Spaces ARE valid field separators in this file. However,
# other *nix-like systems still insist on using tabs as field
# separators. If you are sharing this file between systems, you
# may want to use only tabs as field separators here.
# Consult the syslog.conf(5) manpage.
*.notice;lpr.info;mail.crit;news.err /var/log/messages
security.* /var/log/security
auth.info;authpriv.info /var/log/auth.log
mail.info /var/log/maillog
lpr.info /var/log/lpd-errs
cron.* /var/log/cron
*.emerg *
# uncomment this to enable logging of all log messages to /var/log/all.log
# touch /var/log/all.log and chmod it to mode 600 before it will work
#*.* /var/log/all.log
# uncomment this to enable logging to a remote loghost named loghost
#*.* @loghost
# uncomment these if you're running inn
# news.crit /var/log/news/news.crit
# news.err /var/log/news/news.err
# news.notice /var/log/news/news.notice

Do I add

postgres.*
/var/log/postmaster.log

or perhaps

LOCAL0.*
/var/log/postmaster.log

Regards

Duncan
-----Original Message-----
From: pgsql-novice-owner(at)postgresql(dot)org
[mailto:pgsql-novice-owner(at)postgresql(dot)org]On Behalf Of Tom Lane
Sent: 09 March 2007 16:24
To: Duncan Garland
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] System Log

"Duncan Garland" <duncan(dot)garland(at)ntlworld(dot)com> writes:
> The relevant part of the configuration file (postgresql.conf) was:
> syslog = 2 # range 0-2; 0=stdout; 1=both; 2=syslog
> syslog_facility = 'LOCAL0'
> syslog_ident = 'postgres'

> I then restarted the server. No difference. I'm assuming the log file is
> postmaster.log.

No, given those settings, the messages are going to go wherever your
system's syslog daemon is configured to write "local0" messages.
Possibly /var/log/messages, but this is something that varies wildly
across different platforms ... "man syslogd" should lead you to the
configuration file that determines it.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2007-03-09 18:15:10 Re: System Log
Previous Message Duncan Garland 2007-03-09 17:02:13 Re: System Log