Prevent ContextLogger from logging bodies that are too large #1717
Answered
by
Romakita
CoteArthur
asked this question in
Q&A
-
Files are sent to my server in base64 format causing logs that could be multiple MB large when TSED's default filter logs the request (filter as in error handler). How to could I prevent that? Some solution I thought of :
Thanks ! |
Beta Was this translation helpful? Give feedback.
Answered by
Romakita
Jan 4, 2022
Replies: 1 comment 3 replies
-
Hello @CoteArthur The Catch decorator isn't responsible to filter the logged body. It's PlatformLogMiddleware the responsible and you can override it to define your own strategy. See you |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
CoteArthur
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @CoteArthur
By default, the body isn't logged (excepted if there is an error). Have you changed the default
logger
configuration?The Catch decorator isn't responsible to filter the logged body. It's PlatformLogMiddleware the responsible and you can override it to define your own strategy.
See you
Romain