RE: libpq debug log - Mailing list pgsql-hackers

From Iwata, Aya
Subject RE: libpq debug log
Date
Msg-id 71E660EB361DF14299875B198D4CE5423DEF1844@g01jpexmbkw25
Whole thread Raw
In response to Re: libpq debug log  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: libpq debug log
Re: libpq debug log
List pgsql-hackers
Hi,

Thank you for your comments and advice.

I'd like to consider your suggestions.
I am planning to change libpq logging like this;

1. Expand PQtrace() facility and improve libpq logging.

2. Prepare "output level". There are 3 type of levels;
    - TRADITIONAL    :  if set, outputs protocol messages
    - LEVEL1        :  if set, outputs phase and time
    - LEVEL2        :  if set, outputs both info TRADITIONAL and LEVEL1

3. Add "output phase" information; This is the processing flow. (ex. When PQexec() start and end )

4. Change output method to callback style; Default is stdout, and prepare other callback functions that will be used
morefrequently.
 

5. Initialization method; 
In current one: PQtrace(PGconn *conn, FILE *stream);
Proposed change: PQtraceEx(PGconn *conn, FILE *stream, PQloggingProcessor callback_func , void *callback_arg,
PGLogminlevellevel);
 
PQtrace() can be use as it is to consider compatibility with previous applications, 
so I leave PQtrace() and created a new function PQtraceEx(). 

After discussing the abovementioned, then maybe we can discuss more about enabling trace output and changing the output
style.

What do you think? I would appreciate your comments and suggestions.
 
Regards,
Aya Iwata



pgsql-hackers by date:

Previous
From: Rahila Syed
Date:
Subject: Re: monitoring CREATE INDEX [CONCURRENTLY]
Next
From: Amit Khandekar
Date:
Subject: Re: Minimal logical decoding on standbys