
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
nlogger is a Node.js logging library that can
Use npm or download. Then add to your code:
var logger = require('./nlogger').logger(module);
module is object defined automatically by Node.js. If you don't want automatic module names, replace it with your desired string name.
logger.info(message); logger.info(message, parameter...);
Strings {} in message will be replaced by appropriate parameter. See examples.
var logger = require('./nlogger').logger(module); logger.info('Info message'); logger.debug('Debug message'); logger.warn('Warning message'); logger.error('Error message'); logger.trace('Trace message'); logger.info('Array = {}, Object = {}', [1, 2, 3, 4], {one: 1, two: 2});
2010-10-02 20:39:03.570 INFO main:5 - Info message 2010-10-02 20:39:03.588 DEBUG main:6 - Debug message 2010-10-02 20:39:03.589 WARN main:7 - Warning message 2010-10-02 20:39:03.590 ERROR main:8 - Error message 2010-10-02 20:39:03.590 TRACE main:9 - Trace message 2010-10-02 20:39:03.590 INFO main:10 - Array = [ 1, 2, 3, 4 ], Object = { one: 1, two: 2 }
2010-10-02 20:59:12.496 INFO my-modules/first:3 - Message from first module from line #3 2010-10-02 20:59:12.514 INFO my-modules/second:10 - Message from second module from line #10 2010-10-02 20:59:12.515 INFO fake-module-name:3 - Message from third module from line #3 2010-10-02 20:59:12.516 INFO :3 - Message from fourth module from line #3
nlogger can load optional configuration file nlogger.json which looks like:
{ "color": "auto", "level": { "*": "debug", "my-modules/first": "info" } }
color - print message in color? [true, false, "auto"]level.* - default debug levellevel.yourModuleName - debug level for specified modulePossible debug levels are trace, debug, info, warn, error.
You can also use single letter alias's of the above - eg. log.d()
o.4.0 - Added single letter aliases
0.3.0 - Added parameters support to logging methods
0.2.0 - Added configuration file support
0.1.0 - First npm release
Released under MIT License. Enjoy and Fork!
FAQs
Simple logging library, forked from github.com/schloerke/nlogger
We found that mkslogger 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.