
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@grahamcrackers/logger
Advanced tools
A naive logger for client side applications.
// src/logger.ts
import { createLogger, LogLevel } from "@grahamcrackers/logger";
export const logger = createLogger({
// defaults to LogLevel.Log or (0)
logLevel: LogLevel.Info,
});
Level | Enum | Description |
---|---|---|
Log | 0 | (Default) Logs all levels |
Info | 1 | Helpful for debugging in non prod environments |
Warn | 2 | Show console warnings |
Error | 3 | Show console errors |
I wanted a logger that I could log during development and if I forget to remove a console log because of reasons it won't output critical info if building for production.
I mainly use vite for front end apps these days so this example is using that setup. If you use webpack, you can translate the environment variables to your setup.
your local set up to log everything
VITE_LOG_LEVEL=0
VITE_LOGGING_ENABLED=true
set the log level in prod to only show warnings and errors, or set logging to be disabled entirely.
VITE_LOG_LEVEL=3
# or disable everything
VITE_LOGGING_ENABLED=false
// src/logger.ts
import { createLogger, LogLevel } from "@grahamcrackers/logger";
export const logger = createLogger({
isEnabled: import.meta.env.VITE_LOGGING_ENABLED,
logLevel: import.meta.env.VITE_LOG_LEVEL,
});
FAQs
A naive logger for client side applications.
We found that @grahamcrackers/logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.