@beforeyoubid/console-logger-adapter

A wrapper module to wrap console.xxx() and send all logs to LogDNA

Usage no npm install needed!

<script type="module">
  import beforeyoubidConsoleLoggerAdapter from 'https://cdn.skypack.dev/@beforeyoubid/console-logger-adapter';
</script>

README

LogDNA Console Logger Adapter

This is a console wrapper module to wrap console.xxx() and send all logs to LogDNA

yarn add @beforeyoubid/console-logger-adapter

Activate it

We follow 12-factors and we can enable and send log to LogDNA by supplying LOGDNA_KEY as part of the environment variables.

  LOGDNA_KEY=xxxxxxyyyyyyyzzzzzzz

Please note that on your local, you can set LOGDNA_KEY= to disable sending logs to LogDNA

Add this code to the main handler file

import sendConsoleLogsToLogDNA from '@beforeyoubid/console-logger-adapter';
sendConsoleLogsToLogDNA()