logentries-stream

A stream wrapper for logentries

Usage no npm install needed!

<script type="module">
  import logentriesStream from 'https://cdn.skypack.dev/logentries-stream';
</script>

README

logentries-stream

Simple Stream interface for logentries based on https://github.com/logentries/le_node Please see that project for account creation and configuration for log keys etc.

Prerequisites

A logentries account

Install

npm install logentries-stream

Usage

// Create a stream per log level
var logstream = require('logentries-stream')('LOG_TOKEN', 'LOG_LEVEL');

logstream.write('Hello World');

// Log to stderr in case of connection issues. 
logtream.on('error', function(err) {
    process.stderr.write(err)
})