Skip to main content
The lowest package in the graph: it imports no other @clawboo/* package, so the redactor can live here and be shared by both this package’s pino instance and the Express server without a dependency inversion. It is server-oriented but reaches the browser bundle transitively (@clawboo/gateway-client imports it). The single browser hazard, reading process.env at module-eval time, is guarded behind a typeof process check, and pino ships its own browser shim, so the import is browser-safe. The redactor here is the display / log boundary twin of @clawboo/db’s storage-layer scrubSecrets: different boundary, different mask (•••• vs [REDACTED]), composed as defense in depth.

Public API

Functions

Types & interfaces

Constants

The package exposes no classes. logger is a configured pino instance, createLogger is a factory, and the redactor is plain functions. LOG_LEVEL is read from the environment at module load (default info) but is not itself an export.
redact* is the display/log layer and masks with ••••. It is distinct from @clawboo/db’s storage-layer scrubSecrets (masks with [REDACTED] before anything is persisted). They run at different boundaries and compose; already-scrubbed data passes through here harmlessly. Numeric token counts and cost survive both layers: a SAFE_COUNT_KEYS allowlist, matched against the exact key name, exempts the token-count keys (tokens / inputtokens / tokencount / etc.) plus author / authors, which only matched at all because auth is a substring of the sensitive-key pattern. A real credential under accessToken or authorization still redacts.

Used by

  • packages/gateway-client/src/{client,device-auth}.ts, createLogger for the WS client + Node device-auth (the transitive path that pulls the logger into the browser bundle).
  • apps/web/server/index.ts, createLogger for the Express server’s request logging.
  • apps/web/server/lib/redact.ts, re-exports redactObject / redactValue / redactJsonString / REDACTION_MASK as the server’s documented apply-site import; consumed by api/obs.ts, api/tools.ts, api/governanceAudit.ts, api/health.ts, and lib/teamChat/leaderState.ts.
  • apps/web/server/lib/obs/logger.ts, lib/runtimes/native/conversation.ts, lib/teamChat/runTeamExchange.ts, createLogger for module-scoped logging.
  • packages/events/src/types.ts, imports the Logger type for EventHandlerDeps.log.

Source

Barrel: packages/logger/src/index.ts. The redactor lives in redact.ts (re-exported through the barrel). The package.json exports map declares only the root . entry, no subpath barrels.

See also

Last modified on August 8, 2026