change the interface of log
change the demo of log to fit the modified API