Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
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.
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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.