let get_log_window () = match !the_log_window with | Some w -> w | None -> let w = log_window () in the_log_window := Some w; w