Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

winston-transport-splunk

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winston-transport-splunk

winston transport for Splunk Event API

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23
decreased by-52.08%
Maintainers
1
Weekly downloads
 
Created
Source

winston-splunk

A Splunk transport for winston.

Usage

    import winston from 'winston';
    import { Splunk } from 'winston-splunk';
    
    
    cconst createTransports = (options) => {
        const transports = [];
        
        //
        // Create console and other transports
        //
        
        transports.push(new Splunk(options.splunk));
        return transports;
    };
     
    const options = {  
        console:{  
            level:'debug'
        },
        splunk:{  
            url: YOUR_SPLUNK_URL,
            index: YOUR_SPLUNK_INDEX,
            token: YOUR_SPLUNK_TOKEN,
            host: YOUR_SPLUNK_HOST,
            source: YOUR_SPLUNK_SOURCE,
            sourcetype:'api_json',
            maxRetries:0,
            level:'debug'
        }
    }
         
    const createLogger = options => winston.createLogger({
        levels: winston.config.npm.levels,
        format: winston.format.simple(),
        transports: createTransports(options)
    });

The Splunk transport is based on splunk-logging

Installation

Installing winston-splunk

  $ npm install winston
  $ npm install winston-splunk

Run Linting

  npm run lint

Run Tests

  npm run test
Author: Sean Xiong
License: MIT

Keywords

FAQs

Package last updated on 31 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc