
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@exzeo/winston-logsene
Advanced tools
This is a transport module for the winston logger winstonjs/winston for logging with Logsene by Sematext.
Winston-Logsene combines the flexibility of using the Winston logging framework with Logsene (think Hosted Elasticsearch + Kibana). Create your free account and access token here.
var winston = require('winston')
var logsene = require('winston-logsene')
var logger = new winston.Logger()
logger.add (logsene, {
token: process.env.LOGSENE_TOKEN,
type: 'test_logs',
url: 'https://logsene-receiver.sematext.com/_bulk'
})
https://logsene-receiver.sematext.com/_bulk
. To ship logs to Sematext Cloud (EU) in Europe use https://logsene-receiver.eu.sematext.com/_bulk
level, msg, meta
as parameter and returns the new meta array// use dynamic list of placeholders and parameters and any Object as Metadata
// message placeholders work the same way as in util.format()
logger.info ('Info Message')
// utilize tags (in the metadata object) as filter to be used in Logsene UI
logger.info ('Info Message', {tags: ['info', 'test']})
logger.info ("Info message no. %d logged to %s",1,'Logsene', {metadata: "test-log", count:1 , tags: ['test', 'info', 'winston']})
logger.error ("Error message no. %d logged to %s",1,'Logsene', {metadata: "test-error", count:1, tags: ['test', 'error', 'winston']})
logger.warn ("Warning message no. %d logged to %s",1,'Logsene', {metadata: "test-warning", count:1, tags: ['test', 'warning', 'winston']})
logger.debug ("Debug message no. %d logged to %s",1,'Logsene', {metadata: "test-debug", count:1})
// use custom rewriter
var serverIp = "10.0.0.12";
logger.add (logsene, {
token: process.env.LOGSENE_TOKEN,
rewriter: function (level, msg, meta) {
meta.ip = serverIp;
return meta;
}
})
It is possible to log any JSON Object as meta data, but please note Logsene stores data in Elasticsearch and therefore you should define an index template, matching your data structure. More about Elasticsearch mapping and templates for Logsene: http://blog.sematext.com/2015/01/20/custom-elasticsearch-index-templates-in-logsene/
In addition you should use different types for different meta data structures to avoid type conflicts in Elasticsearch. Include a type name in the meta-data like {type: 'logType1', ...} - this overwrites the "type" property, specified in the contstructor.
logger.add (logsene, {token: process.env.LOGSENE_TOKEN, type: 'my_logs'})
// numeric id, log type from constructor
logger.info('hello', {id: 1})
// The next line will cause a type conflict in Elasticsearch/Logsene, because id was a number before
logger.info('hello', {id: 'ID-1'})
// using a different type, OK no type conflict for the field 'id' in Elasticsearch/Logsene
// because we use a different type in the Elasticsearch/Logsene index
logger.info('hello', {type: 'my_type_with_string_ids',{id: 'ID-1'})
export HTTPS_PROXY=https://my-ssl-proxy.example
export HTTPS_PROXY=http://my-proxy.example
export HTTP_PROXY=http://my-proxy.example
export HTTP_PROXY=https://my-ssl-proxy.example
Apache 2, see LICENSE file
FAQs
Winston transport layer for Logsene
The npm package @exzeo/winston-logsene receives a total of 13 weekly downloads. As such, @exzeo/winston-logsene popularity was classified as not popular.
We found that @exzeo/winston-logsene demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 31 open source maintainers 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.