block-logger

1.1.6 • Public • Published

block-logger

Usage example

npm install --save block-logger

test.js

'use strict';

const process = require('process');
const os = require('os');

const Logger = require('block-logger');

const options = {
    host: process.env.LOGSTASH_HOST || '127.0.0.1',
    port: process.env.LOGSTASH_PORT || 5050,
    domain: 'com.aigent.pipeline.block.' + os.hostname(),
    level: 'debug'
};

const logger = Logger.logstash(options);

let counter = 1;
setInterval(() => {
    console.log(`sending test counter ${counter}`);
    logger.debug('test', {counter: counter++});
}, 1000);

Dev:

Transpile TypeScript into Javascript:

npm install
npm run-script build
npm publish

/block-logger/

    Package Sidebar

    Install

    npm i block-logger

    Weekly Downloads

    2

    Version

    1.1.6

    License

    ISC

    Unpacked Size

    16.1 kB

    Total Files

    7

    Last publish

    Collaborators

    • tothal99
    • degola
    • mauricio.aigent