@a11ywatch/log
TypeScript icon, indicating that this package has built-in type declarations

0.3.5 • Public • Published

@a11ywatch/log

log reports to a11ywatch logger service

Installation

npm i @a11ywatch/log

const { log, setConfig } = require("@a11ywatch/log");

setConfig({ container: "api" });
// out -> { container } logged in each request

log("saved something to db", {
  type: "info",
  container: "api",
  platform: "chrome"
});

Configure logger endpoint

set the env variable LOGGER_URL to the logger service.

Disable log stream

set the env variable LOGGER_ENABLED to false. This will perform logs on the host console instead of logger service.

Enable/disable verbose log outputs

set the env variable LOGGER_VERBOSE to true

Package Sidebar

Install

npm i @a11ywatch/log

Weekly Downloads

0

Version

0.3.5

License

MIT

Unpacked Size

9.25 kB

Total Files

16

Last publish

Collaborators

  • jeffmendez