Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@amazebot/logger
Advanced tools
When building dependencies of more complex apps, you don't want to be too
opinionated about how logs are written, nor add more dependencies that might not
play with choices made in the app. However, you also don't want to hard code
console.log
and end up with multiple output streams.
This package provides standard logging methods for packages requiring it. They route to console.log by default, but apps requiring those packages can pass in their own log utility, to overwrite the default methods (as long as the logger instance is exported).
import { logger } from '@amazebot/logger'
Provides standard debug/info/warning/error methods
export const pkgLogger = logger
pkgLogger.info(`That's pretty much it.`)
Outputs to console by default, but allows override.
import { logger } from 'amazing-logger'
import * as myPackage from 'my-package'
myPackage.logger.replace(logger)
Routes to debug/info/warning/error of new interface.
import { silence } from '@amazebot/logger'
describe('test methods that log', () => {
before(() => silence())
after(() => silence(false))
})
Routes debug/info/warning/error to null output.
FAQs
Basic log handling with overrides for use within other modules.
We found that @amazebot/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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.