[logging] Delay re-creation of log dir until log files created

Summary:
In some error conditions, it could happen that the log file directory
was created early in execution, and then deleted, causing the creation
of log files to then fail.

Reviewed By: sblackshear

Differential Revision: D4157986

fbshipit-source-id: 1548b08
master
Josh Berdine 8 years ago committed by Facebook Github Bot
parent 9fb8931990
commit 25c9d8ae49

@ -50,9 +50,9 @@ let set_log_file_identifier (current_exe : CLOpt.exe) string_opt =
let exe_log_dir =
let log_dir = Config.results_dir // Config.log_dir_name in
log_dir // (log_dir_of_current_exe current_exe) in
create_path exe_log_dir;
let fmt_chan_file name suffix = lazy (
try
create_path exe_log_dir ;
let file =
(* the command-line option takes precedence if specified *)
if name <> "" then name

Loading…
Cancel
Save