Giter Club home page Giter Club logo

winston-sumologic-transport's Introduction

winston-sumologic-transport

A transport for the Winston logger for logging to a SumoLogic endpoint

Version npmBuild Status

Installation

npm install --save winston-sumologic-transport

Usage

  var winston = require('winston');
  var { SumoLogic } = require('winston-sumologic-transport');

  var options = {
    url: 'http://example.com'
  };

  winston.add(SumoLogic, options);
  winston.debug("Hello, world!");

SumoLogic message

After logging message appears in SumoLogic in following format:

{
  level: "debug"
  message: "Hello, world!",
  meta: {}
}

Options

url     : The SumoLogic HTTP collector URL. See https://help.sumologic.com/Send-Data/Sources/02Sources-for-Hosted-Collectors/HTTP-Source/zGenerate-a-new-URL-for-an-HTTP-Source
level   : The minimum logging level to send to SumoLogic [default: 'info']
silent  : A boolean flag to suppress output [default: false]
interval: The interval (in mills) between posts to SumoLogic [default: 1000]
label   : A custom label associated with each message (prepended to message)
meta    : Additional meta data with log message. Properties will be overriden if specified during logging.
onError : A function that will be called when there is an error sending the logs to sumo. It may return a promise.

winston-sumologic-transport's People

Contributors

avens19 avatar cjsheets avatar lionvs avatar phillip-hall avatar repl-andrew-ovens avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.