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 love the fact that you use the debug module, it makes tracing what's going on in our own app as well as it's dependencies (in this case ioredis) a breeze.
I have stumbled upon a situation where I want to see the debug output from ioredis but due to the nature of what I happen to be storing the output is so large that it's making the console output unusable (actually my terminal regularly locks up in this particular situation).
What am I doing?
I'm storing "large" strings (JSON data) for caching purposes.
What am I seeing?
I'm see debug output along the lines of:
ioredis:redis write command[0] -> set("cache_data_1234",{"here_be":"lots of JSON",
.... hunderds/thousands of lines of output in my console ....
}) +337ms
what the redaction string should be? (in my example I used <large_arg_redacted>)
I'd recommend printing the heading several chars of the large argument to provide more details for developers to debug. For example: foobarfoobarfoobar<...8292 more chars>. (I'm not a native speaker so I'm open to any suggestions.
what should be the length threshold for string threshold?
50~200 should be enough as for me.
should the threshold be configurable?
I don't think an option is needed for that.
should there be somekind of config option and/or ENV var that can be used to turn off the redaction completely?
hi there,
I love the fact that you use the
debug
module, it makes tracing what's going on in our own app as well as it's dependencies (in this caseioredis
) a breeze.I have stumbled upon a situation where I want to see the debug output from ioredis but due to the nature of what I happen to be storing the output is so large that it's making the console output unusable (actually my terminal regularly locks up in this particular situation).
What am I doing?
I'm storing "large" strings (JSON data) for caching purposes.
What am I seeing?
I'm see debug output along the lines of:
What would I like to see?
Something along the lines of:
Discuss?
Would you be willing to accept a PR that manipulates the
command.args
that are included in thedebug
output so that "large" strings are redacted?If yes, what do you feel regarding:
<large_arg_redacted>
)thanks for taking the time to read, look forward to your reply!
The text was updated successfully, but these errors were encountered: