postgres
postgres copied to clipboard
Docs issue - `onnotice: false` does not work
The docs state:
onnotice : fn, // Default console.log, set false to silence NOTICE
However setting it to false did not silence the NOTICE logs for me, I had to to set to () => {}.
import getPostgres from "postgres";
...
export const postgres = getPostgres({
database: config.database,
host: config.databaseHost,
port: config.databasePort,
user: config.databaseUser,
pass: config.databasePassword,
onnotice: false, // did not work ?
onnotice: () => {},
});
The typings are correct which do not allow a boolean value.
Apologies if I have misunderstood and this is not a bug.
Version 3.4.5.
Came here to report this same issue. Setting onnotice to false as documented does not work, still appears to default to console.log.