
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
node-tiny-logger
Advanced tools
A very tiny logger for nodejs
npm install --save node-tiny-logger
import Logger from 'node-tiny-logger'
const logger = new Logger({
level: Logger.INFO
})
logger.warn('some warning', {someObject: 1}, ...)
{
level: Logger.FATAL | Logger.ERROR | Logger.WARN | Logger.INFO | Logger.DEBUG | Logger.TRACE,
handleLogEntry?: (levelStr: string, argsPassedToLog),
stream?: NodeJS.WritableStream
}
level:
All logs below this level will be ignored. Eg: If you specify Logger.WARN, then log.error() will work, but log.info() will be ignored
handleLogEntry(levelStr: string, argsPassedToLog):
Optional log entry handler. If you provide it then logs will trigger options.handleLogEntry function instead of writing to options.stream (or process.stdout).
Eg:
const logger = new Logger({
handleLogEntry: function(levelStr, args) {
console.log(levelStr, args)
}
})
logger.error("a", 1, 2); // => ERROR [ 'a', 1, 2 ]
stream:
If provided (and handleLogEntry is not provided) then it will be used to write log. Defaults to process.stdout
FAQs
A very tiny nodejs logger
The npm package node-tiny-logger receives a total of 0 weekly downloads. As such, node-tiny-logger popularity was classified as not popular.
We found that node-tiny-logger 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
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.