add log level and log a object function

add log level and log a object function