Skip to content
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

suggestion: Way to disable notices #254

Open
DjDeveloperr opened this issue Feb 18, 2021 · 4 comments
Open

suggestion: Way to disable notices #254

DjDeveloperr opened this issue Feb 18, 2021 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@DjDeveloperr
Copy link
Member

There should be a way to disable these notices:

img

Because not everyone wants it in their applications.

@andreespirela
Copy link

I agree. Logs should be totally optional, it is up to the developer to decide whether they want their stdout to be altered by other packages.

@Soremwar Soremwar added this to the v0.11.0 milestone Apr 12, 2021
@Soremwar Soremwar added the enhancement New feature or request label Apr 12, 2021
@Soremwar Soremwar self-assigned this Apr 12, 2021
@al6x
Copy link

al6x commented May 21, 2021

+1 it breaks the logs and looks ugly

@al6x
Copy link

al6x commented May 21, 2021

If anyone needs a quick fix

// Hiding notice warnings
import { parseNotice } from "postgres/connection/warning.ts"
import { Connection } from "postgres/connection/connection.ts"

(Connection.prototype as any).processNotice = function(msg: any): any {
  return parseNotice(msg)
}

@imjamesb
Copy link

Any new quick fixes for disabling notices? Really annoying having them show up in my logs. The skipping notices are getting on my nerves to no end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

6 participants