porsager / porsager/postgres

Docs issue - `onnotice: false` does not work

Open
#1,063 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
8.7k
Forks
374
Avg merge
11d 16h
Merged PRs (30d)
1

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No implementation file or test is named. Reproduce the supplied onnotice: false configuration, then compare the package's option handling with the documented behavior and typings; done means false reliably silences NOTICE logs and regression coverage verifies it.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs, postgresql
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.