
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.
@zhike/logger
Advanced tools
A logger has following features:
*. support log to console, file, elasticsearch, kafka, sentry
*. log to file support rotating by time
*. customized formatter
*. supported levels: fatal, error, warning, info, debug
const logger = new Logger({
console: {},
elasticsearch: {
endpoint: '172.16.3.2:19200', // es server endpoint
defaultIndex: 'demo', // default target index
level: 'warning', // log level under warning is supressed
},
file: {
rotateFilename: '[logs/demo_]YYYY-MM-DD[.log]', // rotate by day
level: 'info', // log level under info is supressed
},
})
logger.debug('debug 1')
logger.info('info 1')
logger.info('info 2')
// log to es with index 'demo1' but not default 'demo'
logger.error('error 1', { index__: 'demo1' })
FAQs
A logger has following features:
We found that @zhike/logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 13 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.