and set log to true or false