Closed ruiaraujo closed 1 year ago
I do not understand what you are saying. What is "the Agent instance"? Is your desire not solved by https://github.com/pinojs/pino/blob/146d803e6956638861f57d4d46b275aa8c80fa1d/docs/api.md#serializers-object ?
Not really, due to some programming mistake someone passed in an object using a name that was not in the serializers list.
This object was recursive (which I believe it is handled due to seeing Circular
showing up in those logs) and very big and the node process ran out of memory while attempting to log it.
My request is to allow these mistakes to happen without terrible consequences like crashing servers. :smile:
How would you implement this? I’m not sure I’m following.
I will take a look at the codebase to see how this could be done.
@ruiaraujo Did you manage to resolve this?
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Currently if the
mergingObject
is an object with access to things like an Agent instance or other deeply rich objects, pino will try to copy to the output the entire object.Even though, this can be attributed to programming errors, if one would have a default serializer option for the
mergingObject
, the user can limit the logging operation on this object.Another option would be adding a level to which
mergingObject
will be serialized which for this particular use case would also suffice.