This page explains how to send data from a Node.js app to Axiom through Winston.
To install the SDK, run the following:
After setting up the Axiom transport for Winston, use the logger as usual:
To log errors, use the winston.format.errors
formatter. For example:
To automatically log exceptions and rejections, add the Axiom transport to the exceptionHandlers
and rejectionHandlers
. For example:
Running on Edge runtime isn’t supported.
For more examples, see the examples in GitHub.
This page explains how to send data from a Node.js app to Axiom through Winston.
To install the SDK, run the following:
After setting up the Axiom transport for Winston, use the logger as usual:
To log errors, use the winston.format.errors
formatter. For example:
To automatically log exceptions and rejections, add the Axiom transport to the exceptionHandlers
and rejectionHandlers
. For example:
Running on Edge runtime isn’t supported.
For more examples, see the examples in GitHub.