Skip to content
ContractSpec
Start here

Package manual · platform

·Observability, testing and qualification

lib.logger

Comprehensive logging library optimized for Bun with ElysiaJS integration

platformlibraryv5.0.4stablewebservernodebrowser
@lssm-tech/lib.logger
bun add @lssm-tech/lib.logger
Package source ↗Manifest ↗

Manifest declarations describe the current workspace; they do not verify registry publication or runtime execution.

Package guide

Website: https://contractspec.io

Comprehensive logging library optimized for Bun with ElysiaJS integration.

What It Provides

  • Layer: lib.
  • Consumers: email, jobs, contracts-runtime-server-mcp, bundles, apps.
  • Related ContractSpec packages include @lssm-tech/tool.bun, @lssm-tech/tool.typescript.
  • Related ContractSpec packages include @lssm-tech/tool.bun, @lssm-tech/tool.typescript.

Installation

npm install @lssm-tech/lib.logger

or

bun add @lssm-tech/lib.logger

Usage

Import the root entrypoint from @lssm-tech/lib.logger, or choose a documented subpath when you only need one part of the package surface.

Architecture

  • src/context.browser.ts is part of the package's public or composition surface.
  • src/context.node.ts is part of the package's public or composition surface.
  • src/context.ts is part of the package's public or composition surface.
  • src/elysia-plugin.ts is part of the package's public or composition surface.
  • src/formatters.ts is part of the package's public or composition surface.
  • src/index.browser.ts is part of the package's public or composition surface.
  • src/index.ts is the root public barrel and package entrypoint.
  • src/types.ts is shared public type definitions.

Public Entry Points

  • Export . resolves through types, browser, default.
  • Export ./context resolves through types, browser, node, ...
  • Export ./context.browser resolves through ./src/context.browser.ts.
  • Export ./context.node resolves through ./src/context.node.ts.
  • Export ./elysia-plugin resolves through ./src/elysia-plugin.ts.
  • Export ./formatters resolves through ./src/formatters.ts.
  • Export ./index.browser resolves through ./src/index.browser.ts.
  • Export ./logger resolves through types, browser, node, ...
  • Export ./logger.browser resolves through ./src/logger.browser.ts.
  • Export ./logger.node resolves through ./src/logger.node.ts.
  • The package publishes 15 total export subpaths; keep docs aligned with package.json.

Local Commands

  • bun run dev — contractspec-bun-build dev
  • bun run build — contractspec-bun-build build
  • bun run lint — bun run lint:fix
  • bun run lint:check — biome check .
  • bun run lint:fix — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
  • bun run typecheck — tsgo --noEmit
  • bun run publish:pkg — bun publish --tolerate-republish --ignore-scripts --verbose
  • bun run publish:pkg:canary — bun publish:pkg --tag canary
  • bun run clean — rm -rf dist
  • bun run build:bundle — contractspec-bun-build transpile
  • bun run build:types — contractspec-bun-build types
  • bun run prebuild — contractspec-bun-build prebuild

Recent Updates

  • Replace eslint+prettier by biomejs to optimize speed.

Notes

  • Logger interface is used across the entire stack — breaking changes affect everything.
  • Structured log format must stay JSON-compatible for log aggregation pipelines.
  • Elysia plugin must not break the middleware chain; preserve onRequest/onAfterHandle order.

Relationships

THIS PACKAGElib.logger16 import paths

Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.

3 declarations

Declared capabilities

Lib Logger

Comprehensive logging library optimized for Bun with ElysiaJS integration

Scripts

  • cleanrm -rf dist
  • lintbun run lint:fix
  • lint:fixnode ../../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../../scripts/biome.cjs check --write .
  • lint:checknode ../../../../scripts/biome.cjs check .
  • publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
  • publish:pkg:canarybun publish:pkg --tag canary
  • buildcontractspec-bun-build build
  • build:bundlecontractspec-bun-build transpile
  • build:typescontractspec-bun-build types
  • devcontractspec-bun-build dev
  • prebuildcontractspec-bun-build prebuild
  • typechecktsgo --noEmit