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 more frequently.
5. Initialization method;
In current one: PQtrace(PGconn *conn, FILE *stream);
Proposed change: PQtraceEx(PGconn *conn, FILE *stream, PQloggingProcessor
callback_func , void *callback_arg, PGLogminlevel level);
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