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

Do not use Console type for logger #158

Open
binarykitchen opened this issue Jan 10, 2025 · 0 comments
Open

Do not use Console type for logger #158

binarykitchen opened this issue Jan 10, 2025 · 0 comments

Comments

@binarykitchen
Copy link
Contributor

I see for the new logger option, the Node.js Console type is used:
https://github.com/ChetanXpro/nodejs-whisper/blob/main/src/index.d.ts#L18

Although this conflicts with many other logging mechanisms which do not extend from Console, for example, I use PinoJS which has an entirely different interface. It uses streaming and does not have all the Console functions. Too many TS errors on my app.

I'd try to generalise it as much as possible, and only use the absolute minimum. Something like

interface WhisperConnsole {
  debug: (any) => void
  error: (any) => void
  // etc ...
}
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

1 participant