logto icon indicating copy to clipboard operation
logto copied to clipboard

feature request: Environment Flag to Control Koa Request Logs

Open 0xMurage opened this issue 1 year ago • 0 comments

What problem did you meet?

Currently, Logto's Koa middleware logs all incoming HTTP requests. While this can be helpful for debugging and monitoring in some cases, it is noisy in production environments with high traffic.

https://github.com/logto-io/logto/blob/b04bb9229c18718ee9a3b8f33f381ec81c70604d/packages/core/src/app/init.ts#L36-L44

Describe what you'd like Logto to have

I propose introduction of an environment flag (e.g., LOGTO_ENABLE_REQUEST_LOGS) that would allow users to control whether or not these Koa request logs are enabled.

0xMurage avatar Apr 13 '25 00:04 0xMurage