Releases: vllnt/logger
Releases · vllnt/logger
v0.1.2
v0.1.1
v0.1.0 — Initial Release
Structured JSON logging for the @vllnt ecosystem. Zero runtime dependencies, tree-shakeable, works in Node.js, Convex, browser, and edge runtimes.
New Files
| File | Description |
|---|---|
src/core.ts |
Core logger: types, createLogger, createExtendedLogger, composeOutputs, consoleOutput, formatLogEntry, parseLogLevel |
src/backend.ts |
Node.js preset: createBackendLogger with lazy LOG_LEVEL from process.env |
src/convex.ts |
Convex-safe logger: createConvexLogger with explicit level (no process.env) |
src/posthog.ts |
PostHog output adapter: createPostHogOutput wrapping a capture function |
src/testing.ts |
Test utility: createTestOutput for in-memory log capture and assertions |
src/index.ts |
Public API barrel — re-exports core + backend |
.github/workflows/ci.yml |
CI pipeline: lint, typecheck, test, build on push/PR to main |
eslint.config.js |
ESLint flat config extending @vllnt/eslint-config/nodejs |
tsup.config.ts |
Build config: 4 ESM entry points with code splitting and .d.ts generation |
vitest.config.ts |
Test runner config |
tsconfig.json |
TypeScript config extending @vllnt/typescript/node-library.json |
Summary
- Added scoped structured logger with 4 log levels (
debug,info,warn,error) - Added
withTimingandwithTimingSynchelpers for operation duration tracking - Added
composeOutputsfor fan-out to multiple outputs with error isolation - Added 4 subpath exports:
.,./convex,./posthog,./testing - Added crash-safe JSON serialization (handles BigInt, circular refs, throwing toJSON)
- Added reserved field protection (
event,level,timestampcannot be overwritten) - Added CI pipeline with lint, typecheck, test, and build gates
- Configured
sideEffects: falsefor tree-shaking