Observability
Logging
How logging is configured across environments.
The logging functionality is abstracted through a simple wrapper that provides a consistent logging interface across environments.
How it works
Every environment writes structured JSON to console. Locally you read the terminal. In production, Cloudflare Workers Observability collects those lines (dashboard, Logpush, Tail Workers). There is no Better Stack / Logtail transport.
Usage
Import and use the log object. It shares the same interface as the console object:
import { log } from '@repo/observability/log';
log.info('Hello, world!');