Simple logger with automatic context (file + line). Zero dependencies.
Standard console.log tells you nothing about where a log came from:
- No file name, no line number
- No visual distinction between info, warnings, and errors
- No way to disable debug logs in production
- Scattered
console.log("here")everywhere
devlog adds automatic context to every log — file, line, and level — with zero configuration.
npm install @promise-inc/devlogimport { log } from "@promise-inc/devlog";
log.info("User created", { userId: 42 });
log.warn("Deprecated method");
log.error("Failed to save", err);
log.success("Migration complete");
log.debug("Cache hit", { key: "users:1" });import { createLogger } from "@promise-inc/devlog";
const logger = createLogger({
enabled: true,
debugEnabled: false,
});
logger.info("Custom logger");| Variable | Effect |
|---|---|
DEVLOG_ENABLED=false |
Disables all logs |
DEVLOG_ENABLED=true |
Enables all logs including debug |
NODE_ENV=production |
Disables debug level (unless DEVLOG_ENABLED=true) |
- Node.js — Colored output with ANSI escape codes
- Browser —
console.groupCollapsedwith%cstyling. Data nested inside collapsible groups
To report a bug, please first read our guide on opening issues.
To open a pull request, please first read our guide on opening pull requests, which outlines our process for RFCs and pull requests.
| Package | Description |
|---|---|
@promise-inc/ai-guard |
Detect AI-generated code patterns |
@promise-inc/ps-guard |
Lighthouse-based performance guard |
@promise-inc/fs-guard |
Validate project folder and file structure |
@promise-inc/ui-states |
Auto-generated skeleton loading states |
@promise-inc/dev-reel |
Animated SVG previews for READMEs |
Developed by Promise Inc.
MIT © Promise Inc.