[pitch] SwiftNIO based PostgreSQL client

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.

1 Like

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.

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.

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

1 Like

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).