fix when log variable is a object

Signed-off-by: Yi-Feng Tzeng <yftzeng@gmail.com>