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

Comments

Projects
None yet
3 participants
@Janpot

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

This comment has been minimized.

Show comment
Hide comment
@benjamingr

benjamingr Jan 27, 2016

Collaborator

Related: nodejs/node#4782

Collaborator

benjamingr commented Jan 27, 2016

Related: nodejs/node#4782

@benjamingr

This comment has been minimized.

Show comment
Hide comment
@benjamingr

benjamingr Jan 31, 2016

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.

Collaborator

benjamingr commented Jan 31, 2016

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

This comment has been minimized.

Show comment
Hide comment
@petkaantonov

petkaantonov Feb 12, 2016

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.

Owner

petkaantonov commented Feb 12, 2016

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