change handling of log in example