![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
log-skeleton
Advanced tools
Object that allows you to use the log API even if the logger was never initialized.
log-skeleton is a simple object with methods .fatal
, .error
, .warn
, .info
, .debug
and .trace
. It is initalized with you favorite log instance, or nothing at all.
I.e. you can do either
var real_log = require('bunyan').createLogger({name: 'example'});
var log = require('log-skeleton')(real_log);
or
var log = require('log-skeleton')();
In the first case any simple API call to log
will be forwarded to real_log
, while in the latter case, every simple log API call will be silently ignored. It's meant to be a drop in tool for you module when you want to outsource the responsibility of creating a logger, but don't want to have a bunch of if (log) {}
lying around.
var skeleton = require('log-skeleton');
module.exports = function (options) {
var log = skeleton((options) ? options.log : undefined);
...
log.info("Doesn't matter if options.log is undefined");
};
If options.log
is undefined, the call to log.info
does nothing. If it's a log object, the logger will log at the appropriate level.
The original log object is exposed at log.log
in the above example, as to give you an access point to the real log object.
MIT
FAQs
Object that allows you to use the log API even if the logger was never initialized.
The npm package log-skeleton receives a total of 7 weekly downloads. As such, log-skeleton popularity was classified as not popular.
We found that log-skeleton 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.