@axiomhq/winston
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

Axiom transport for Winston logger

The Axiom transport for Winston logger allows you to send data from a Node.js app to Axiom through Winston.

import { WinstonTransport as AxiomTransport } from '@axiomhq/winston';

const logger = winston.createLogger({
    level: 'info',
    format: winston.format.json(),
    defaultMeta: { service: 'user-service' },
    transports: [
        new AxiomTransport({
            dataset: 'my-dataset',
            token: 'my-token',
        }),
    ],
});

logger.log({
    level: 'info',
    message: 'Logger successfully setup',
});

Install

npm install @axiomhq/winston

Documentation

For more information about how to set up and use the Axiom transport for Winston logger, see the axiom.co/docs/guides/winston.

License

MIT

Package Sidebar

Install

npm i @axiomhq/winston

Weekly Downloads

12,989

Version

1.3.0

License

MIT

Unpacked Size

17.6 kB

Total Files

13

Last publish

Collaborators

  • gabrielelpidio
  • flbn
  • seiflotfy
  • bahlo
  • mhr3
  • lukasmalkmus
  • kevinehosford