@vaya/logdna-formatter

Formats string to logdna format

Usage no npm install needed!

<script type="module">
  import vayaLogdnaFormatter from 'https://cdn.skypack.dev/@vaya/logdna-formatter';
</script>

README

LogDNA Formatter

A small library that converts string to LogDNA logs, used for Lambdas

Installation

npm install @vaya/logdna-formatter

Usage

var loginfo = require('@vaya/logdna-formatter').info
let logHost = {"hostname": "<your-host-name>", "logStream": "<your-log-stream>", "tags": "tag1, tag2"}
loginfo('log text', logHost)

//ES6
import * as log from @vaya/logdna-formatter'
let logHost = {"hostname": "<your-host-name>", "logStream": "<your-log-stream>", "tags": "tag1, tag2"}
log.info('log text', logHost)

Tests

npm test