![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.
@voodoo.io/fast-logger
Advanced tools
Simple fast logger which contain a LRU cache to avoid big spike to the stack of logs.
Supported and tested : >= 8.10
Version | Supported | Tested |
---|---|---|
12.x | yes | yes |
10.x | yes | yes |
9.x | yes | yes |
8.x | yes | yes |
$ npm install @voodoo.io/fast-logger --save
You must set in your var env: APP_NAME
Accepted format:
You can provide a var env: LOG_LEVEL
. For example, setting "warn" will disabled trace, debug and info logs.
Accepted values:
const logger = require('@voodoo.io/fast-logger');
logger.info('My log', {key: 'value'}, [0,1,2]);
logger.error('My error');
// output:
// {"app":"MyAppName","time":"2020-02-11T16:18:07.731Z","level":"info","msg":"My log","key":"value","data_0":[0,1,2]}
// {"app":"MyAppName","time":"2020-02-11T16:18:07.731Z","level":"error","msg":"My error"}
The logger has a buffer of 100 ms by default if the logs are exactly the same (same objects, not same JSON-equivalent object) More information at: https://www.npmjs.com/package/lru-cache
const logger = require('@voodoo.io/fast-logger');
// It will log only one time `My log` and `My error`
for (let i = 0; i < 100; i++) {
logger.info('My log');
logger.error('My error');
}
You can disable the logger by calling the function setCacheTTL
with a negative integer value or you can customize the TTL
of the items in the cache
const logger = require('@voodoo.io/fast-logger');
// cache is disable
logger.setCacheTTL(-1);
// buffer of 1 sec in the cache
logger.setCacheTTL(1000);
$ npm test
Coverage report can be found in coverage/.
FAQs
Fast logger with a buffer
The npm package @voodoo.io/fast-logger receives a total of 2 weekly downloads. As such, @voodoo.io/fast-logger popularity was classified as not popular.
We found that @voodoo.io/fast-logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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
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.