You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've came across the need to have parts of my response body written to the log,
currently this library supports all or nothing, with dot notation support it will improve greatly as I will be able to pick specific parts of the body to log, but dot notation is not enough,
I have for example a response body that contains an array of big objects and frankly I only want their ids to be logged, with dot notation that's impossible unfortunately.
It would be extremely helpful to control the response object that's gonna be written to the log
at first i thought that requestFilter and responseFilter were exposed precisely for that,
but they only control properties of the object, I propose changing these functions implementations (or deprecating them and creating new functions) that will be given the full object and their return value will be the object that will be written to the log
The text was updated successfully, but these errors were encountered:
The library has a "dynamicMeta" function option that if specified allows you to add arbitrary metadata programmatically to the log entry. See the "index.d.ts" for the signature but it's basically a function that takes in two arguments, the express request and express response and if it returns an object, its fields get added to the log entry metadata.
I've came across the need to have parts of my response body written to the log,
currently this library supports all or nothing, with dot notation support it will improve greatly as I will be able to pick specific parts of the body to log, but dot notation is not enough,
I have for example a response body that contains an array of big objects and frankly I only want their ids to be logged, with dot notation that's impossible unfortunately.
It would be extremely helpful to control the response object that's gonna be written to the log
at first i thought that
requestFilter
andresponseFilter
were exposed precisely for that,but they only control properties of the object, I propose changing these functions implementations (or deprecating them and creating new functions) that will be given the full object and their return value will be the object that will be written to the log
The text was updated successfully, but these errors were encountered: