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

warning hook #980

Closed
Janpot opened this issue Jan 26, 2016 · 3 comments
Closed

warning hook #980

Janpot opened this issue Jan 26, 2016 · 3 comments

Comments

@Janpot
Copy link

Janpot commented Jan 26, 2016

I'd like to add my own logging logic when it comes to displaying warnings. Would it be possible to add a hook to intercept these warnings so I can handle them myself?

process.on('bluebirdWarning', function (warn) {
  // ...
});
@benjamingr
Copy link
Collaborator

Related: nodejs/node#4782

@benjamingr
Copy link
Collaborator

We should hold off until there's a node consensus and then decide if we want to reuse their hook if it's appropriate. In theory this sounds like a good idea if it's not too much work.

@petkaantonov
Copy link
Owner

Added as 'warning' in 3.3. `'warn' alias will probably be added if node adds it as well since the api is the same (.name, .message, .stack). Still undocumented.

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

No branches or pull requests

3 participants