Re: How to print application_name in log_line_prefix (using %a)?

From: Chris Angelico <rosuav(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to print application_name in log_line_prefix (using %a)?
Date: 2012-10-29 06:29:24
Message-ID: CAPTjJmouu5=Gik5Oo-_g8CDz4CkvMap_V38iJFs+Lgy-Y1Tz-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Oct 29, 2012 at 5:22 PM, Tianyin Xu <tixu(at)cs(dot)ucsd(dot)edu> wrote:
> Thanks a lot, Chris!
>
> Yes, the manual said that "It is typically set by an application upon
> connection to the server." exactly your approach.
>
> But the examples you gave me is to print the application_name in the query
> results, aren't they? Do you know how to make it as the prefix of the local
> log messages?

The examples I gave configure the application_name for a given
connection. Everything that connection does will then get logged with
that name, if you use %a. You can also see that name in
pg_stat_activity.

ChrisA

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tianyin Xu 2012-10-29 06:44:24 Re: How to print application_name in log_line_prefix (using %a)?
Previous Message Tianyin Xu 2012-10-29 06:22:35 Re: How to print application_name in log_line_prefix (using %a)?