
Research
/Security News
Miasma Mini Shai-Hulud Hits ImmobiliareLabs npm Packages
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.
Configure once, log everywhere.
A lightweight, zero-dependency colored logger for Node.js with full TypeScript support. Custom log levels, timestamps, level filtering, and runtime switching — all in one tiny package.
Website · npm · Report a Bug
Most logging libraries are designed for production-grade infrastructure — they're heavy, complex, and need configuration files, transports, and plugins just to get colored output.
logpaint does one thing well: it gives your Node.js app beautiful, colored console logs with a single function call. No config files. No transports. No dependencies. Just install, call createLogger(), and your terminal comes to life.
| Feature | logpaint | chalk | winston | pino |
|---|---|---|---|---|
| Zero dependencies | ✅ | ✅ | ❌ | ❌ |
| Built-in log levels | ✅ | ❌ | ✅ | ✅ |
| Custom levels (typed) | ✅ | ❌ | ✅ | ❌ |
| Level filtering | ✅ | ❌ | ✅ | ✅ |
| Runtime level switching | ✅ | ❌ | ✅ | ❌ |
| ESM + CJS | ✅ | ✅ | ✅ | ✅ |
| TypeScript generics | ✅ | ✅ | ❌ | ✅ |
debug, info, success, warn, error — ready out of the boxhttp, db, query, or anything else, fully typed in TypeScriptYYYY-MM-DD HH:MM:SS format)minLevel to suppress noise in productionsetLevel(), no restart neededimport and require() out of the box# npm
npm install logpaint
# yarn
yarn add logpaint
# pnpm
pnpm add logpaint
Requirements: Node.js ≥ 14
import { createLogger } from 'logpaint';
const log = createLogger();
log.info('Server started on port 3000');
log.success('Database connected');
log.warn('Deprecated API endpoint used');
log.error('Failed to read config file');
log.debug('Request payload: { id: 42 }');
Output (colors rendered in your terminal):
[INFO] Server started on port 3000
[SUCCESS] Database connected
[WARN] Deprecated API endpoint used
[ERROR] Failed to read config file
[DEBUG] Request payload: { id: 42 }
Pass timestamp: true to prepend a YYYY-MM-DD HH:MM:SS timestamp to every log line.
import { createLogger } from 'logpaint';
const log = createLogger({ timestamp: true });
log.info('Request received');
log.success('Response sent in 42ms');
log.error('Connection timeout');
2026-02-22 10:30:45 [INFO] Request received
2026-02-22 10:30:45 [SUCCESS] Response sent in 42ms
2026-02-22 10:30:45 [ERROR] Connection timeout
Set minLevel to suppress all logs below a certain priority. Useful for silencing debug/info noise in production.
import { createLogger } from 'logpaint';
const log = createLogger({ minLevel: 'warn' });
log.debug('Hidden'); // suppressed — priority 0 < 2
log.info('Hidden'); // suppressed — priority 1 < 2
log.warn('Visible'); // shown — priority 2 ≥ 2
log.error('Visible'); // shown — priority 3 ≥ 2
| Level | Color | Priority |
|---|---|---|
debug | magenta | 0 |
info | cyan | 1 |
success | green | 1 |
warn | yellow | 2 |
error | red | 3 |
Add your own log levels with custom colors, prefixes, and priorities. They're fully typed — TypeScript will give you autocomplete on log.http(), log.db(), etc.
import { createLogger } from 'logpaint';
const log = createLogger({
timestamp: true,
levels: {
http: { color: 'brightBlue' },
db: { color: 'brightMagenta', prefix: 'DATABASE' },
},
});
log.http('GET /api/users 200 OK');
log.db('Query executed in 12ms');
log.info('Default levels still work');
2026-02-22 10:30:45 [HTTP] GET /api/users 200 OK
2026-02-22 10:30:45 [DATABASE] Query executed in 12ms
2026-02-22 10:30:45 [INFO] Default levels still work
You can also pass a color name directly as a shorthand:
import { createLogger } from 'logpaint';
const log = createLogger({
levels: {
http: 'brightBlue',
db: 'brightMagenta',
},
});
Change the minimum log level at any point during execution using setLevel(). No process restart needed — useful for toggling verbose output in long-running servers.
import { createLogger } from 'logpaint';
const log = createLogger();
log.info('Visible'); // shown
log.setLevel('error'); // from now on, only show errors
log.info('Hidden'); // suppressed
log.error('Visible'); // shown
logpaint ships both ESM and CJS builds. Use require() if you're not using ES modules.
const { createLogger } = require('logpaint');
const log = createLogger({ timestamp: true });
log.info('Works with require() too');
log.success('CJS + ESM — your choice');
Use any of these color names in color fields for built-in or custom levels.
| Basic | Bright |
|---|---|
black | brightBlack |
red | brightRed |
green | brightGreen |
yellow | brightYellow |
blue | brightBlue |
magenta | brightMagenta |
cyan | brightCyan |
white | brightWhite |
createLogger(config?)Creates and returns a logger instance. All built-in level methods and any custom level methods are available on the returned object.
| Option | Type | Default | Description |
|---|---|---|---|
timestamp | boolean | false | Prepend YYYY-MM-DD HH:MM:SS to each log |
minLevel | string | undefined | Minimum priority level to display |
levels | Record<string, ANSIColor | LevelConfig> | undefined | Custom levels to add alongside built-ins |
| Field | Type | Default | Description |
|---|---|---|---|
color | ANSIColor | required | ANSI color name for this level |
prefix | string | level name (uppercase) | Label shown in brackets, e.g. [DB] |
priority | number | 1 | Priority used for minLevel filtering |
| Method | Description |
|---|---|
log.debug(...args) | Log at debug level (priority 0) |
log.info(...args) | Log at info level (priority 1) |
log.success(...args) | Log at success level (priority 1) |
log.warn(...args) | Log at warn level (priority 2) |
log.error(...args) | Log at error level (priority 3) |
log.setLevel(level) | Change minimum log level at runtime |
Contributions, bug reports, and feature requests are welcome.
git checkout -b feat/your-featurenpm testPlease open an issue first for large changes so we can discuss the approach.
MIT © Sounak Das
FAQs
Configure once, log everywhere — a lightweight colored logger for Node.js
The npm package logpaint receives a total of 1 weekly downloads. As such, logpaint popularity was classified as not popular.
We found that logpaint demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.

Security News
/Research
Mini Shai-Hulud expands into the Go ecosystem after hitting LeoPlatform npm packages and targeting GitHub Actions workflows.