Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Simple, opinionated, isomorphic logging.
It uses winston on the server and console.log
on the client. It supports multiple arguments. If you have LOGGLY environment variables set, it will auto-configure the winston loggly transport.
import * as Logstar from 'logstar';
Logstar.debug('foo');
Logstar.info('bar');
Logstar.fatal('error', new Error('error'));
class Logger
import { Logger } from 'logstar';
constructor(options = {})
Configure loggly here. Optionally provide a globalMeta
object to be attached to each log request.
{
logLevel: 'info',
loggly: {
token: '',
subdomain: '',
tags: '',
},
globalMeta: {}
}
meta
parameter, and the first argument is used as the log message.meta
parameter, with an empty log message.context
property on the meta
object.debug(...args)
debugf(format, ...args)
info(...args)
infof(format, ...args)
warn(...args)
warnf(format, ...args)
error(...args)
errorf(format, ...args)
fatal(...args)
fatalf(format, ...args)
transactionLogger
Get a logger that adds a transaction_id
property to the meta. Useful for tracking related requests.
import { transactionLogger } from 'logstar';
const myLogger = transactionLogger('TRANSACTION-ID');
default
Logger pre-configured with loggly parameters from environment variables. (See below)
import Logstar from 'logstar';
Logstar.info('Hello', 12, { foo: 'bar' }, [1, 2, 3], new Error('Hello'));
// This will end up as:
{"level": "info", "message": "Hello", "context": [12, {"foo": "bar"}, [1, 2, 3], "Hello"]}
ENV VARIABLES
LOG_LEVEL="debug" # Defaults to info
LOGGLY_SUBDOMAIN="mysubdomain"
LOGGLY_TAGS="api-server,production"
LOGGLY_TOKEN="secret-loggly-token-here"
FAQs
Simple, opinionated, isomorphic logging.
The npm package logstar receives a total of 3 weekly downloads. As such, logstar popularity was classified as not popular.
We found that logstar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.