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.
atom-simple-logger
Advanced tools
a simple logger for atom packages. With colors and namespaces and stuff..
a simple logger for atom packages. With colors and namespaces and stuff..
npm install --save atom-simple-logger
returns a Function({pkg,nsp})
options | Type | Usage |
---|---|---|
pkg | string | name of your package |
nsp | string | (optional) shortcut for setting the namespace |
if atom.inDevMode()
returns a Function(nsp)
unless nsp was already provided, in which case this function will be called with the provided nsp
returns a Function(string,lvl)
options | Type | Usage |
---|---|---|
string | string | string to log |
lvl | integer | (optional) debug level of this message |
will issue a console.log of the format #{pkg}.#{nsp}: #{string}
whereas the prefix will be colored
It will try to get the debug level by atom.config.get("#{pkg}.debug")
if a debug level is optained and it is lower than lvl
, the output will be suppressed
Unless atom.inDevMode()
all returned functions will be empty and return null.
# in your package declaration
config:
debug:
type: "integer"
default: 0
minimum: 0
# some other place
log = require("atom-simple-logger")(pkg:"name-of-you-package",nsp:"main")
log "activating"
# if in dev mode and debug for your package is set
# will output name-of-you-package.main: activating
log "doing verbose stuff",2
# will only output if debug is set to 2 or higher
Copyright (c) 2015 Paul Pflugradt Licensed under the MIT license.
FAQs
a simple logger for atom packages. With colors and namespaces and stuff..
The npm package atom-simple-logger receives a total of 0 weekly downloads. As such, atom-simple-logger popularity was classified as not popular.
We found that atom-simple-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.