
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
A multi transport logging package for the hive platform. The logger can support any logger the implements the winston logging interface. Out of the box the logging package supports file
transports for a log file that will get rotated every day, stdout
which simply dumps all logs to the host computers stdout, and syslog
which attempts to send logs to a running syslog server over udp.
Logging options are set using the hive conf package so you can set you logging options as you would everything else. You use the --logger
or -l
the flag can be passed mutliple times to specify multiple transports. There is always an exception transport called stderr
in the config that will always write to stdout For example, if you wanted to log to syslog, but also get feedback from stdout:
node server.js --logger=stdout --logger=syslog
trasport specific configuration can be specified using the log
:<TRANSPORT>
prefix. For example you can disable the json formatting by passing the prettyPrint
option a falsy value.
node server --logger=stdout --log:stdout:prettyPrint=0
node server --log:stderr:prettyPrint=1
Name | Description |
---|---|
stdout | prints output to the current stdout |
syslog | sends logs to a syslog server over UDP |
file | Writes logs to a file that is rotated daily |
papertrail | Sends logs to a configured papertrail server |
The logging package exports a fully configured winston interface that supports syslog logging levels. Each level is method on the interface that logs with the logging level, tag and logging level
var logger = require('bitters')
logger.http('hello world')
logger.debug('hello world')
logger.info('hello world')
logger.notice('hello world')
logger.warning('hello world')
logger.error('hello world')
logger.crit('hello world')
logger.alert('hello world')
logger.emerg('hello world')
The loggers suppport the same formatting options and Node's util module.
var logger = require('bitters');
logger.debug('Hi, %s, my name is %', "Bill", variable)
The last argument to any of the log method can be a serialiable object and it will be included in the log data in an appropriate format.
var logger = require('bitters');
logger.debug("Dude, I just got some %s data", 'crazy', {key:'value'} )
FAQs
Multi transport logging for hive
The npm package bitters receives a total of 3 weekly downloads. As such, bitters popularity was classified as not popular.
We found that bitters demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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 how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.