question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: promise API?

See original GitHub issue

With async/await it would be useful it winston exposed a promise API (this could be done in a backwards compatible way).

const doSomething = async () => {
  // this doesn't block
  logger.error('some error', new Error('foo'))
  // this blocks
  await logger.error('some error', new Error('foo'))
  // get sentry ID
  const sentryErrorId = await logger.error('some error', new Error('foo'))
}

doSomething()

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:47
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

27reactions
indexzerocommented, May 9, 2018

It’s still a valid feature request – if more folks 👍 we’ll consider it. Just wanted to be clear that the lack of it is not causing any problems nor the source of any defects.

13reactions
isikhicommented, Jun 24, 2020

+1

Read more comments on GitHub >

github_iconTop Results From Across the Web

'request' with Promise - GitHub
The simplified HTTP request client 'request' with Promise support. Powered by Bluebird. - GitHub - request/request-promise: The simplified HTTP request ...
Read more >
How to Make API Requests with Request-Promise in Node.js
... of this tutorial for links to prerequisites and related tutorials: https://heynode.com/tutorial/how-make- api -requests- request - promise...
Read more >
Top 5 request-promise-native Code Examples - Snyk
To help you get started, we've selected a few request-promise-native examples, based on popular ways it is used in public projects.
Read more >
README.md - UNPKG
API in Detail Consider Request-Promise being: - A Request object - With an ... cancellation feature](http://bluebirdjs.com/docs/api/cancellation.html).
Read more >
request-promise-native | Yarn - Package Manager
Native ES6+ promises may have fewer features than Bluebird promises do. In particular, the .finally(...) method was not included until Node v10. Installation....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found