import { requestLogger } from "@wrnexus/core";
import { env } from "../env.ts"; // validated at startup (throws on misconfiguration)

// Structured request logging: pretty in dev, JSON in production. Runs before
// every page and API route; the request id is stored on ctx.locals.requestId.
export default requestLogger({ format: env.NODE_ENV === "production" ? "json" : "pretty" });
