Closed
Description
With regard to logging of hooks and functions:
- The amount of data that is being logged with each hook invocation can be enormous in our application.
- Structured data is being stuck into the message as a string and then also being included in metadata
I suggest that in FunctionsRouter.js and triggers.js removing the stringified params, results and errors from the message and just leaving them as objects in the meta info object that is also being passed to the logger.
Add the user if it exists to the meta info.
Additionally, add a truncate logs config option that will prevent the logged meta info from going deeper than one level (i.e. if an array of 10 stories is returned, replace contained objects with just the objectId and not the whole object and its contents).
Seeking input here. If there's some agreement that this would be a useful change, I'll cook it up and submit a pr.
Metadata
Metadata
Assignees
Labels
No labels