Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
blue-ox is a logging library inspired by debug by visionmedia. The justification for yet another logging library (tm) here is while debug is very handy, it doesn't support nice things for large long running apps. Things like different log levels, multiple destinations, blacklist or whitelisting from code, and parameters that can change after load.
var logger = require('blue-ox');
or var logger = require('blue-ox').beGlobal();
var log = logger(scope[, defaultLevel])
scope
is a path-like string separated by :
s. Each root scope gets a color from a round-robin list of colors to make them stand out a little more in the default output. If a logger is requested with a defaultLevel
and does not already exist, it will be created with the default level. If the logger already exists, the level is left as-is.
logger.beGlobal()
or logger.beGlobal(true)
sets up the global and returns the module.
logger.beGlobal(false)
tears the global down and returns the module.
log.color(color[, bright][, string])
The appropriate ANSI escape sequences are added only if logger.useColor
is true, and it defaults to true if node is run in a TTY.
If a string is supplied, then a reset will be inserted at the end of it. Otherwise, only an initial change sequence will be returned.
To output a reset, you can use log.color.reset()
. To dump out an ANSI code, you can use log.color.ansi(code)
.
var log = require('blue-ox')('mymodule');
// log an error
log.error(new Error('I will have a stack trace.'));
// log a warning
log.warn(new Error('I will also have a stack trace, but I will be labeled as WARN by default.'));
// sorta pretend we're using debug
var debug = log.debug;
debug('I will put out a debug message.');
// shared namespace, like debug
var child = require('blue-ox')('mymodule:child');
child.trace('I will have the same coloring as mymodule messages, but I will have a deeper namespace.');
// add a custom level
require('blue-ox').addLevel('foo');
child.foo('fooing'); // 'outputs FOO: mymodule:child > fooing' on the default console output
// color helper
log.info('Now listening on port ' + log.color('green', true, '3000'));
0.3.0
ansi
and reset
helpers on the colors
function.FAQs
Logging inspired by giants with axes.
The npm package blue-ox receives a total of 2 weekly downloads. As such, blue-ox popularity was classified as not popular.
We found that blue-ox 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.