
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
winston-splunk-httplogger
Advanced tools
A Winston compatible transport for logging to a Splunk HTTP Event Collector
A Winston transport for logging to Splunk with a HTTP Event Collector.
NOTE
This project is no longer under active development. I can reasonably accept PRs, providing they include unit tests for the functionality and pass all existing tests. However, I do not have the ability to test against a live Splunk service.
Winston >= 3.0.0
is required for winston-splunk-httplogger
>= 2.0.0
. Please use version 1.2.2
for legacy Winston support.
npm install --save winston winston-splunk-httplogger
var winston = require('winston'),
SplunkStreamEvent = require('winston-splunk-httplogger');
var splunkSettings = {
token: process.env.SPLUNK_TOKEN,
host: process.env.SPLUNK_HOST || 'localhost'
};
// Now use winston as normal
var logger = new winston.Logger({
transports: [
new winston.transports.Console(),
new SplunkStreamEvent({ splunk: splunkSettings })
]
});
logger.info('This is sent to Splunk');
Create a new instance of SplunkStreamEvent
. Takes the following configuration:
SplunkStreamEvent
instanceSplunk Logger
settingsseverity
field of an eventurl.parse
. This will try to
set host
, path
, protocol
, port
, url
. Any of these values will be
overwritten if the corresponding property is set on config
function(message, severity)
true
.Splunk will provide you with a token at the end of the wizard. You need to insert that token into the splunk object you use to create the SplunkStreamEvent() object. In the example above, this is done by placing the token in the SPLUNK_TOKEN environment variable.
FAQs
A Winston compatible transport for logging to a Splunk HTTP Event Collector
The npm package winston-splunk-httplogger receives a total of 4,861 weekly downloads. As such, winston-splunk-httplogger popularity was classified as popular.
We found that winston-splunk-httplogger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.