From: | Stuart Kendrick <skendric(at)fhcrc(dot)org> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | log statements span multiple lines |
Date: | 2010-11-28 14:44:55 |
Message-ID: | 4CF26AE7.9060206@fhcrc.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
How do I tell postmaster to log SQL statements to a single line?
At the moment, a particular statement gets chopped up across multiple
syslog lines:
Nov 28 06:28:31 guru postgres[5698]: [4-1] LOG: 00000: statement:
SELECT mac, ip_addr, vlan, ad_ou, os_hostname, dns_hostname,
Nov 28 06:28:31 guru postgres[5698]: [4-2]
version_name, snmp_sys_descr, snmp_sys_objectid, wireless_ap,
Nov 28 06:28:31 guru postgres[5698]: [4-3]
switch_name, slot, port, first_seen, last_seen, last_updated FROM hosts
LEFT JOIN switch_ports ON
Nov 28 06:28:31 guru postgres[5698]: [4-4] hosts.switch_port =
switch_ports.portid LEFT JOIN switches ON switch_ports.switch =
switches.switchid LEFT JOIN os_versions ON
Nov 28 06:28:31 guru postgres[5698]: [4-5] hosts.osver =
os_versions.versionid WHERE ip_addr = '10.1.2.3' ORDER BY ip_addr ASC
whereas I would prefer to see:
Nov 28 06:28:31 guru postgres[5698]: [4-1] LOG: 00000: statement: SELECT
mac, ip_addr, vlan, ad_ou, os_hostname, dns_hostname, version_name,
snmp_sys_descr, snmp_sys_objectid, wireless_ap, switch_name, slot, port,
first_seen, last_seen, last_updated FROM hosts LEFT JOIN switch_ports ON
hosts.switch_port = switch_ports.portid LEFT JOIN switches ON
switch_ports.switch = switches.switchid LEFT JOIN os_versions ON
hosts.osver = os_versions.versionid WHERE ad_ou IS NOT NULL ORDER BY
ip_addr ASC
Nov 28 06:28:32 guru {some other log message}
--sk
Stuart Kendrick
FHCRC
From | Date | Subject | |
---|---|---|---|
Next Message | Stuart Kendrick | 2010-11-28 14:58:35 | debugging SQL statements |
Previous Message | Mladen Gogala | 2010-11-25 14:42:41 | Re: HELP WITH A QUERY |