From 7ff39673e854c153acd2eacf1e6db8bc2096e9fa Mon Sep 17 00:00:00 2001 From: Islam Shehata Date: Thu, 28 Sep 2023 21:10:44 +0300 Subject: [PATCH] document migration process to v1.x --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 78780c41..d26b41f2 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,22 @@ This is a monorepo, for specific documentation, check out the different projects * [`@axiomhq/winston`](./packages/winston): A [winston](https://github.com/winstonjs/winston) transport which sends logs to Axiom. * [`@axiomhq/pino`](./packages/pino): A [pino](https://github.com/pinojs/pino) transport which sends logs to Axiom. + +## Migrate to v1.x + +- Pass the credentials as an object to Axiom client, this package no longer reads them from the environment variables. + do: + ```ts + const axiom = new Axiom({ + token: process.env.AXIOM_TOKEN, + }); + ``` + instead of: + ```ts + const axiom = new Axiom(); + ``` + + ## License Distributed under the [MIT License](LICENSE).