stipsan / ioredis-mock

Emulates ioredis by performing all operations in-memory.
MIT License
338 stars 123 forks source link

Support DEBUG env ioredis:* to print debug info #925

Open falkenhawk opened 4 years ago

falkenhawk commented 4 years ago

Hello, Would it be feasible to implement handling DEBUG env (DEBUG=ioredis:*), as in https://github.com/luin/ioredis#debug to print out everything related to redis? (i.a. when a connection is instantiated, what data is being read or written)

It's sometimes helpful to set up a short test case and read through the debug info, to ensure that things are working as intended. If ioredis-mock is dropped in, that debug info is not printed anymore.

titanism commented 2 years ago

Bump

titanism commented 2 years ago

We can sponsor or award a small bug bounty if this is added @stipsan. Whether it be using util.debug from Node's util package, the debug package, or some sort of logger.

stipsan commented 1 year ago

@titanism I don't have time to work in it myself but I'll happily review a PR if you send in one 😄