Skip to content

Docs issue - onnotice: false does not work #1063

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rhyst opened this issue Apr 28, 2025 · 1 comment
Open

Docs issue - onnotice: false does not work #1063

rhyst opened this issue Apr 28, 2025 · 1 comment

Comments

@rhyst
Copy link

rhyst commented Apr 28, 2025

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.

@syshriki9
Copy link

syshriki9 commented May 9, 2025

Came here to report this same issue. Setting onnotice to false as documented does not work, still appears to default to console.log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants