add $log.debug

Add debug logs. It was very useful to create the patch #7