1. fix logging bugs.
2. sync latest code.

Signed-off-by: dannygod <dannygodii@gmail.com>