Add maxStringLength option for util.inspect #27042
Labels
feature request
Issues that request new features to be added to Node.js.
util
Issues and PRs related to the built-in util module.
Problem
When using
util.inspect()
, it would be nice to have the ability to truncate string values over a certain length wherever they exist in the object under inspection. This would allow us to avoid logging out entire strings in situations where they can be potentially huge and they add too much space in the logs.Proposed solution
Add a
maxStringLength
option to util.inspect, similar tomaxArrayLength
option that currently exists.The text was updated successfully, but these errors were encountered: