[pitch] SwiftNIO based PostgreSQL client


(Nathan Harris) #21

Now that the Logging API has been accepted into Sandbox, with Metrics coming soon, we should probably discuss how and what we want to log.


(Nathan Harris) #22

To provide my perspective on logging, basing them off of the discussion on log levels between os_log and the logging framework:

The driver should only log to debug, or critical and higher.


(Tanner) #23

Is there any way to distinguish verbosity of debug levels? For example, I'd love to have an extra verbose debug level (think -vvv) where details about all incoming / outgoing postgres messages and how they are being parsed is printed. This would be helpful during development and tracking down bugs.

Besides that, I think replacing any existence of print("[ERROR] ...") with log.error(...) will be pretty straightforward.


(Nathan Harris) #24

The current logging API does define trace above debug

That seems appropriate for most of the "debug" logging we might want to do in the driver


(Johannes Weiss) #25

Note however that there's a new thread discussing the log levels that both os_log and the server logging API are going to use. So it looks like it'll become syslog levels (and in fact in the repo that is very soon to be opened I made that change).