ioredis
                                
                                
                                
                                    ioredis copied to clipboard
                            
                            
                            
                        [Feature Request] Implement a Logger system
Hello,
We are using IORedis as our internal library to connect to our redis server. We also have a Postgresql server we connect to using TypeORM. With the TypeORM library, we have an extended logging system thanks to their Logger module (https://github.com/typeorm/typeorm/blob/master/docs/logging.md#using-custom-logger).
We think it would be great to also have a similar logger module to use with IORedis.
The use case for this Logger module is to allow the user to implement custom log modules. We use the TypeORM custom logger to connect to the Wiston Logger module, for example.
knex example:
- https://knexjs.org/guide/#log
 
const knex = require('knex')({
  log: {
    warn(message) {
    },
    error(message) {
    },
    deprecate(message) {
    },
    debug(message) {
    },
  }
});
                                    
                                    
                                    
                                
Also would love to see this.
If a library produces logs, then it should allow logger customization by library consumers.
+1 for feature request. We want to use pino-logger and make sure that all output have the same format - line-delimited JSON.