Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@axiomhq/winston

axiomhq75.7kMIT1.3.1TypeScript support: included

The official Axiom transport for winston logger

axiom, winston, axiom-js, axiom-winston

readme

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

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

[1.3.0] - 2024-11-20

  • Update @axiomhq/js to v1.3.0

[1.2.0] - 2024-09-23

  • fix: Make flush() public
  • Update @axiomhq/js to v1.2.0

[1.1.0] - 2024-07-12

  • Update @axiomhq/js to v1.1.0

[1.0.0] - 2024-06-12

  • Update @axiomhq/js to v1.0.0

[1.0.0-rc.4] - 2024-06-10

Changed

  • Update @axiomhq/js to version 1.0.0-rc.4

Fixed

  • fix: add BigInt support to JSON.stringify [#189] from lucassmuller/fix/json-stringify

Changed

  • Update @axiomhq/js to version 1.0.0-rc.3

[1.0.0-rc.3] - 2024-03-20

Fixed

  • Fix fetch request init with retry in @axiomhq/js

Changed

  • Update @axiomhq/js to version 1.0.0-rc.3

[1.0.0-rc.2] - 2024-02-09

Changed

  • Update @axiomhq/js to version 1.0.0-rc.2

[1.0.0-rc.1] - 2023-09-27

Breaking Change

  • Axiom token is now required as a parameter of the constructor, automatic detection of environment variables is now removed.

Fixed

  • switched the build process to use rollup in order to solves the module resolution issue.
  • reorder the export object of winston package.json

0.1.2 - 2023-06-26

Fixed

  • Add types to package.json exports (#29)
  • Fake process.env for browsers (#26)

0.1.1 - 2023-06-20

Fixed

  • Updated @axiomhq/js dependency

0.1.0 - 2023-06-14

Initial release