开发者社区> 镜像站> NPM> newsource-winston-splunk-logger
newsource-winston-splunk-logger
Splunk logging library that uses winston
Last updated a year ago by mss-npm-user .
ISC · Original npm · Tarball · package.json
$ cnpm install newsource-winston-splunk-logger 
SYNC missed versions from official npm registry.

How to install

To install run

 npm install --save newsource-winston-splunk-logger

How to use:

Import the module into your project like so:

const logger = require('newsource-winston-splunk-logger');
//need to pass in a config value in the following format
const config = {
    "appName": "[application name goes here]", //optional
    "toEmailAddress": "[email address goes here]", //optional
    "fromEmailAddress": "[email address goes here]", //optional
    "directory": "[log directory goes here]", //optional
    "fileName": "[log file name goes here]", //optional
    "dateFormat": "MM/DD/YYYY hh:mm:ss A Z", //required
    "fileLevel": "[file level goes here]", //optional,
    "emailLevel": "[email level goes here]", //optional,
    "smtpHost": "[smtp host address goes here]", //optional
    "splunk": {
        "url": "[splunk cloud url goes here]", //required for splunk
        "token": "[token goes here]", //required for splunk
        "sourcetype": "[source type goes here]", //optional
        "level": "[log level goes here]" //required for splunk
    },
    "levels":{
        "custom level key" : "custom level value" 
    } //optional
}

const loggerInstance = logger.initialize(config);

Current Tags

  • 2.1.0                                ...           latest (a year ago)

23 Versions

  • 2.1.0                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 1.0.20                                ...           a year ago
  • 1.0.19                                ...           a year ago
  • 1.0.18                                ...           2 years ago
  • 1.0.17                                ...           3 years ago
  • 1.0.16                                ...           3 years ago
  • 1.0.15                                ...           3 years ago
  • 1.0.14                                ...           3 years ago
  • 1.0.13                                ...           3 years ago
  • 1.0.12                                ...           3 years ago
  • 1.0.11                                ...           3 years ago
  • 1.0.10                                ...           3 years ago
  • 1.0.9                                ...           3 years ago
  • 1.0.8                                ...           3 years ago
  • 1.0.7                                ...           3 years ago
  • 1.0.6                                ...           3 years ago
  • 1.0.5                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (11)
Dev Dependencies (1)
Dependents (0)
None