> ... (loglevel) parameter doesn't produce any messages ...
Please verify that your application calls java.sql.DriverManager.setLogWriter(PrintWriter) to set the log destination.
I just tested loglevel in PostgreSQL JDBC Driver 42.0.0.SNAPSHOT and including loglevel=2 in the JDBC connection string sets the loglevel correctly but the driver will only log messages if there is a valid LogWriter.