bun install @chneau/elysia-logger
import { logger } from "@chneau/elysia-logger";
import { Elysia } from "elysia";
const app = new Elysia().use(logger()).listen(8080);
/*
<-- GET /logout
--> GET /logout 200 in 0 ms
<-- POST /login
--> POST /login 200 in 5 ms
*/
- Generate type declarations with
tsc directly, removing bun-plugin-dts and
its TypeScript 5 override.
- Log the real response status for
status(), set.status, not found, and
thrown errors.
- Tests covering the log format, method filtering, and status codes.
- Properly log error requests.