Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
klg-logger
Advanced tools
log 工具,基于 tracer,简单,可以显示 log 的位置
见 tracer 文档 https://www.npmjs.com/package/tracer
默认版本是把 log 输出到 console
import { Logger } from 'klg-logger'
const logger = new Logger({
level: config.get('log.level'),
dateformat: 'yyyy-mm-dd HH:MM:ss.L',
inspectOpt: {
showHidden: false, // if true then the object's non-enumerable properties will be shown too. Defaults to false
depth: 5 // tells inspect how many times to recurse while formatting the object. This is useful for inspecting large complicated objects. Defaults to 2. To make it recurse indefinitely pass null.
}
})
logger.info('hello world')
logger.debug('hello %s', 'world')
logger.error('hello %s', 'error')
export default logger
如果你需要把 log 输出到文件或者发送其他地方,可以自定义 transport function
const logger = new Logger({
level: 'log',
transport: function (data: Tracer.LogOutput) {
// 写文件
fs.write(data)
// 发送其他地址
tcp.send(data)
assert(data)
assert(data.level === 0)
}
})
logger.log('hello world')
FAQs
log 工具,基于 tracer,简单,可以显示 log 的位置
The npm package klg-logger receives a total of 33 weekly downloads. As such, klg-logger popularity was classified as not popular.
We found that klg-logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.