Re: Log LDAP "diagnostic messages"?

From: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Christoph Berg <myon(at)debian(dot)org>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Log LDAP "diagnostic messages"?
Date: 2017-08-16 05:43:10
Message-ID: CAFjFpRerRucN5fcF7Aw1mR_2PWuGHBTcZVfzoHBZTp7ZK0P5-A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 16, 2017 at 8:44 AM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> Christoph Berg wrote:
>> Re: Thomas Munro 2017-08-10 <CAEepm=09jnV7hK5rTxPp816bMuve7dJGbjtEcjeXrhAELHFxqw(at)mail(dot)gmail(dot)com>
>> > > Agreed. Here's a version that skips those useless detail messages
>> > > using a coding pattern I found elsewhere.
>> >
>> > Rebased after bf6b9e94.
>>
>> > message ? errdetail("Diagnostic message: %s", message) : 0));
>>
>> "Diagnostic message" doesn't really mean anything, and printing
>> "DETAIL: Diagnostic message: <something>" seems redundant to me. Maybe
>> drop that prefix? It should be clear from the context that this is a
>> message from the LDAP layer.
>
> I think making it visible that the message comes from LDAP (rather than
> Postgres or anything else) is valuable. How about this?
>
> LOG: could not start LDAP TLS session: Protocol error
> DETAIL: LDAP diagnostics: unsupported extended operation.
>
+1, pretty neat.

--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2017-08-16 06:32:47 Re: taking stdbool.h into use
Previous Message Amit Langote 2017-08-16 05:36:15 Re: expanding inheritance in partition bound order