@alphatango/logger

Logger which takes care of truncating Bearer tokens, safe JSON stringification, and converts errors to json objects.

Usage no npm install needed!

<script type="module">
  import alphatangoLogger from 'https://cdn.skypack.dev/@alphatango/logger';
</script>

README

ATSquad Token Provider

Logger which takes care of truncating Bearer tokens, safe JSON stringification, and converts errors to json objects.

Using this library

Install the library.

yarn add @alphatango/logger
import Logger from '@alphatango/logger';

const defaultConfiguration = { logFunction: console.log, jsonSpace: 2 };

let requestLogger = new RequestLogger(defaultConfiguration);

requestLogger.log({ title: 'Message title', level: 'WARN', error: 'Error'});

Contribution

We value your input as part of direct feedback to us, by filing issues, or preferably by directly contributing improvements:

  1. Fork this repository
  2. Create a branch
  3. Contribute
  4. Pull request