Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WUdOO-0006QA-2u for pgsql-admin@arkaria.postgresql.org; Mon, 31 Mar 2014 14:40:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WUdON-0007n2-9l for pgsql-admin@arkaria.postgresql.org; Mon, 31 Mar 2014 14:40:51 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WUdOK-0007ig-Bb for pgsql-admin@postgresql.org; Mon, 31 Mar 2014 14:40:48 +0000 Received: from mail-ig0-f171.google.com ([209.85.213.171]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WUdOG-000161-Gz for pgsql-admin@postgresql.org; Mon, 31 Mar 2014 14:40:47 +0000 Received: by mail-ig0-f171.google.com with SMTP id c1so2335211igq.16 for ; Mon, 31 Mar 2014 07:40:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:message-id:in-reply-to:references :subject:mime-version:content-type; bh=fd6V36hc4IK28nmG77CoEuTZYouYBwUXioCX4M7AIHw=; b=dSBWEsnXM6yNG+0nCflJeDuSTrNs+8HEx7oI04Disj7g/ZBjhrQS1adyERWhTBk88S AMH45WHqPNPwt/JOGFoewyLwzuz8oXY9BgU3f+zPNAxC8PmdcSubllm1aUWWm5esxDRa 5mpuBDTppsaIZsATMgJLz7kATEsj3ZHe/77pmtFwtGZYqcaWH+iPZmMSU6mKnwkh4dKq iMCGJTVg3Xfqiz2Oq6czd/cNsfwQGujuHnsyQegZy2Tz9ssWTwDPh7jLjnLRDztJwupb KHV/cMcdK+k3g5YGSg4vh+wuYjH/DYvg/Eo3BhkfiBXhSBJjJS7lXhd/odjp5JCwRtl3 w/Cw== X-Gm-Message-State: ALoCoQmo2NjvG2glvLNgwgjYdg/7x6XMRMsadUSWywCd4LaH3t0J+LMSuOs9OYMahZYQpG17eDwGjzH9DIGbq9VIlQF8evS36K/ozEXQG8ArlBNa0SWbKVg= X-Received: by 10.42.227.195 with SMTP id jb3mr30737223icb.27.1396276843464; Mon, 31 Mar 2014 07:40:43 -0700 (PDT) Received: from palos ([50.76.140.65]) by mx.google.com with ESMTPSA id bf7sm25595446igb.9.2014.03.31.07.40.41 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 31 Mar 2014 07:40:41 -0700 (PDT) Date: Mon, 31 Mar 2014 08:40:55 -0600 From: Jason Mathis To: "=?utf-8?Q?pgsql-admin=40postgresql.org?=" , Sergey Arlashin Message-ID: In-Reply-To: References: Subject: Re: PostgreSQL 9.3 logging: separate log messages X-Mailer: Airmail (231) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="53397e77_66334873_1a0" X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --53397e77_66334873_1a0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I am not exactly sure how to achieve just that, but have you checked out so= mething like=C2=A0https://github.com/dalibo/pgbadger? We use it here and love it. It parses out all your queries and does a great= analysis on them. I have a script that emails me a report every morning.= =C2=A0 -jason=C2=A0 On March 31, 2014 at 7:33:39 AM, Sergey Arlashin (sergeyarl.maillist@gmail.= com) wrote: Hi! =20 What is the proper way to separate queries from other messages while loggin= g? =20 For example: =20 I have 'log_min_duration_statement' parameter in postgresql.conf . Therefor= e I get postgresql system messages and slow queries in one log file /var/lo= g/postgresql/postgresql-9.3-main.log . =20 In order to simplify further reading I'd like to get slow queries in /var/l= og/postgresql/postgresql-slowqueries.log and all the rest in /var/log/postg= resql/postgresql.log. =20 I tried to implement this by means of rsyslog but didn't manage to get any = decent result. =20 Any help will be greatly appreciated :) =20 -- =20 Best regards, =20 Sergey Arlashin =20 -- =20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) =20 To make changes to your subscription: =20 http://www.postgresql.org/mailpref/pgsql-admin =20 --=20 =20 This transmission contains confidential and privileged information intended= =20 solely for the party identified above. If you receive this message in=20 error, you must not use it or convey it to others. Please destroy it=20 immediately and contact the sender at (303) 386-3955 or by return e-mail to= =20 the sender. --53397e77_66334873_1a0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =
I am not exactly sure how to achieve just that, bu= t have you checked out something like https://github.com/dalibo/pgbadger?

We use it here and love it.= It parses out all your queries and does a great analysis on them. I have a= script that emails me a report every morning. 

-jason 


On March 31, 2014 at 7:33:39 AM, Sergey Arlashin (sergeyarl.maillist@gmail.com) wrote:=

Hi!

What is the proper way to separate queries from other messages while lo= gging?

For example:

I have 'log_min_duration_statement' parameter in postgresql.conf . Ther= efore I get postgresql system messages and slow queries in one log file /va= r/log/postgresql/postgresql-9.3-main.log . =20

In order to simplify further reading I'd like to get slow queries in /v= ar/log/postgresql/postgresql-slowqueries.log and all the rest in /var/log/p= ostgresql/postgresql.log. =20

I tried to implement this by means of rsyslog but didn't manage to get = any decent result. =20

Any help will be greatly appreciated :)

--
Best regards,
Sergey Arlashin







-- =20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

This transmission contains confidential = and privileged information intended solely for the party identified above. If you receive = this message in error, you must not use it or convey it to others. Please destroy it immediately and contact the se= nder at (303) 386-3955 or by return e-mail to the sender.

--53397e77_66334873_1a0--