Skip to content

Releases: vllnt/logger

v0.1.2

10 Mar 17:26

Choose a tag to compare

Other Changes

  • chore: use RELEASE_PAT for publish release checkout (#3)

v0.1.1

10 Mar 17:14

Choose a tag to compare

Other Changes

  • chore: add publish workflow, refine CI (#2)

v0.1.0 — Initial Release

09 Mar 13:46
4c5377a

Choose a tag to compare

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 withTiming and withTimingSync helpers for operation duration tracking
  • Added composeOutputs for 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, timestamp cannot be overwritten)
  • Added CI pipeline with lint, typecheck, test, and build gates
  • Configured sideEffects: false for tree-shaking