0.1.3 • Published 6 months ago

@axiomhq/logging v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Axiom Logging library

The @axiomhq/logging package allows you to send structured logs to Axiom from any JavaScript application.

// lib/axiom/logger.ts
import axiomClient from '@/lib/axiom/axiom';
import { Logger, ConsoleTransport, AxiomJSTransport } from '@axiomhq/logging';

export const logger = new Logger({
  transports: [
    new AxiomJSTransport({ axiom: axiomClient, dataset: process.env.AXIOM_DATASET! }),
    new ConsoleTransport({ prettyPrint: true }),
  ],
});

logger.info('Hello World!');

Install

npm install @axiomhq/js @axiomhq/logging

Documentation

For more information about how to set up and use the @axiomhq/logging package, see the axiom.co/docs/guides/javascript.

License

MIT

0.1.3

6 months ago

0.1.2

8 months ago

0.1.1

8 months ago

0.1.0

8 months ago

0.0.1

9 months ago