Re: libpq debug log - Mailing list pgsql-hackers

From Ramanarayana
Subject Re: libpq debug log
Date
Msg-id CAKm4Xs4AVkSArc8TgvcbxkV95sYe36+sMO5vOgGwikJpYWcP0g@mail.gmail.com
Whole thread Raw
In response to RE: libpq debug log  ("Iwata, Aya" <iwata.aya@jp.fujitsu.com>)
Responses RE: libpq debug log  ("Iwata, Aya" <iwata.aya@jp.fujitsu.com>)
List pgsql-hackers
Hi,

I have tested the trace log implementation.Please find my feedback for the same.

Issues found while testing
---------------------------------
1) If invalid value is given to PGLOGMINLEVEL, empty log file is created which should not happen.
2) If log file size exceeds the value configured in PGLOGSIZE, new log file is not getting created.
3) If PGLOGSIZE is greater than 2048 bytes, log file is not created.Is this expected behaviour?
4) In the log file, an extra new line is present whenever the query is printed.Is this intentional?
5)Documentation for this feature is having grammatical errors and some spelling errors which can be looked into.

Feedback in the code
----------------------------------
1) if else statement should be used for checking log levels rather than multiple if statements
2) Across the code, sufficient space need to be left between parameters in functions and while using comparison operators  
3) In libpq-fe.h in the comments section it should trace rather than trce

Suggestions
----------------------
-> Will it better if the logs of all processes are written to a single log file with the log message containing the process id rather than one log file per process?


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Ryu floating point output patch
Next
From: Peter Eisentraut
Date:
Subject: Re: libpq environment variables in the server