debug mode logging and redis sub extraction