Replies: 2 comments 3 replies
-
Do I understand correctly that the your concern regarding the logging middleware is related to the following line and I'd like it not to be there for your situation, @crgeary ? |
Beta Was this translation helpful? Give feedback.
2 replies
-
v22.13.0, @crgeary import { createConfig } from "express-zod-api";
const config = createConfig({
accessLogger: (request, logger) => logger.info(request.path), // or null to disable
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We would like the ability to customise the incoming request logger middleware as we already handle this with a custom middleware. It looks like the only way to do this is to create a child logger that either sets a null action on
debug()
or uses a regex to match and skip that log, which is not ideal.I've looked here, and don't think there is a way around it:
https://github.com/RobinTail/express-zod-api/blob/master/express-zod-api/src/server.ts#L57
I'd like to have either:
Option 2 would be my personal preference for greater flexibility, and would also provide an alternative solution for #2365 too. What do you think of such a feature?
Thanks :)
Beta Was this translation helpful? Give feedback.
All reactions