log and multiple threads