
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@everymundo/simple-logr
Advanced tools
A very simplistic logger that allows one to avoid using the console.log directly allowing stubbing and better linting.
A very simplistic logger that allows one to avoid using the console.log directly allowing stubbing and better linting.
It's just a simple wrapper around console./log|war|error/ with a few extra features.
npm install @everymundo/simple-logr
The environmental variable LOG_LEVEL can be used to change the log level for the logger. LOG_LEVEL default value is info. That means all your calls to logr.trace and logr.debug are not going to print anything out.
Assuming you run the (simple-usage.js)[ls examples/simple-usage/simple-usage.js] script with the environmental variable LOG_LEVEL=trace, you can see the expected result.
const logr = require('@everymundo/simple-logr');
logr.trace('message'); // outputs: YYYY-MM-DDTHH:mm:ss.zzz TRACE: filename:lineNumber message
logr.debug('message'); // outputs: YYYY-MM-DDTHH:mm:ss.zzz DEBUG: filename:lineNumber message
logr.info('message'); // outputs: YYYY-MM-DDTHH:mm:ss.zzz INFO: message
logr.warn('message'); // outputs: YYYY-MM-DDTHH:mm:ss.zzz WARN: message
logr.error('message'); // outputs: YYYY-MM-DDTHH:mm:ss.zzz ERROR: message
logr.fatal('message'); // outputs: YYYY-MM-DDTHH:mm:ss.zzz FATAL: message
If you clone this repo you can run the above examples with the help of npm scripts. Here are the steps:
git clone https://github.com/EveryMundo/simple-logr.git
cd simple-logr/examples/simple-usage
npm install
npm run trace
npm run debug
npm run info
npm run warn
npm run error
npm run fatal
FAQs
A very simplistic logger that allows one to avoid using the console.log directly allowing stubbing and better linting.
The npm package @everymundo/simple-logr receives a total of 18 weekly downloads. As such, @everymundo/simple-logr popularity was classified as not popular.
We found that @everymundo/simple-logr demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.