Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Canceled after 0s
23 lines
639 B
Plaintext
23 lines
639 B
Plaintext
import { MiddlewareHandler } from "../../types.js";
|
|
//#region src/middleware/logger/index.d.ts
|
|
type PrintFunc = (str: string, ...rest: string[]) => void;
|
|
/**
|
|
* Logger Middleware for Hono.
|
|
*
|
|
* @see {@link https://hono.dev/docs/middleware/builtin/logger}
|
|
*
|
|
* @param {PrintFunc} [fn=console.log] - Optional function for customized logging behavior.
|
|
* @returns {MiddlewareHandler} The middleware handler function.
|
|
*
|
|
* @example
|
|
* ```ts
|
|
* const app = new Hono()
|
|
*
|
|
* app.use(logger())
|
|
* app.get('/', (c) => c.text('Hello Hono!'))
|
|
* ```
|
|
*/
|
|
export declare const logger: (fn?: PrintFunc) => MiddlewareHandler;
|
|
//#endregion
|
|
export {};
|