
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
elasticsearch-transport
Advanced tools
A ElasticSearch transport for winston.
A small library to enable send logs to elasticsearch to analyze logs and build dashboards in Grafana, Kibana or customized plataform.
import winston from 'winston'
import TransportElastic from 'elasticsearch-transport'
const logger = winston.createLogger({
format: winston.format.combine(winston.format.timestamp(), winston.format.json(), winston.format.prettyPrint()),
transports: [
new winston.transports.Console()
new TransportElastic({
silent: false,
elasticClient: {
node: 'http://elasticsearch:9200',
auth: {
username: 'elastic',
password: 'elastic',
}
}
})
],
});
logger.info('saving log in elasticsearch!!');
The Elastic transport takes the following options. All options is required:
Option | Description |
---|---|
silent | REQUIRED. Enable or disable to save the log in elasticsearch |
elasticClient | REQUIRED. The options/credentials to connect in ElasticSearch |
NPM
$ npm install winston elasticsearch-transport
Yarn
$ yarn add winston elasticsearch-transport
FAQs
Winston tranport to save logs in elasticsearch
The npm package elasticsearch-transport receives a total of 90 weekly downloads. As such, elasticsearch-transport popularity was classified as not popular.
We found that elasticsearch-transport 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.