import { log } from "~/lib/server/logger";

export default eventHandler(async (ev) => {
	log.profile("request");
	ev.node.res.on("close", () => {
		log.profile(
			`{${
				ev.context.currentUser?.username || "guest"
			}} | ${ev.method.toLocaleUpperCase()} @ ${ev._path}`,
		);
	});
});
