rewrite to use redis for log storage