Emit log identifier in stderr, when Infer is launched

Reviewed By: jvillard

Differential Revision: D6592147

fbshipit-source-id: 63f9b91
master
Martino Luca 7 years ago committed by Facebook Github Bot
parent 3fc41af811
commit 7d78588f49

@ -77,12 +77,16 @@ let log_environment_info () =
let prepare_events_logging () =
(* there's no point in logging data from the events command. To fetch them we'd need to run events again... *)
if CLOpt.equal_command Config.command CLOpt.Events then ()
else (
L.environment_info "Infer log identifier is %s\n" (EventLogger.get_log_identifier ()) ;
else
let log_identifier_msg =
Printf.sprintf "Infer log identifier is %s\n" (EventLogger.get_log_identifier ())
in
L.environment_info "%s" log_identifier_msg ;
if CLOpt.is_originator && Config.print_log_identifier then L.progress "%s" log_identifier_msg ;
let log_uncaught_exn exn ~exitcode =
EventLogger.log (EventLogger.UncaughtException (exn, exitcode))
in
L.set_log_uncaught_exception_callback log_uncaught_exn )
L.set_log_uncaught_exception_callback log_uncaught_exn
let () =
@ -145,4 +149,3 @@ let () =
EventLogger.dump () ) ;
(* to make sure the exitcode=0 case is logged, explicitly invoke exit *)
L.exit 0

@ -1618,6 +1618,12 @@ and print_builtins =
"Print the builtin functions and exit"
and print_log_identifier =
CLOpt.mk_bool ~long:"print-log-identifier"
~in_help:CLOpt.([(Run, manual_generic)])
"Print the unique identifier that is common to all logged events"
and print_using_diff =
CLOpt.mk_bool ~deprecated_no:["noprintdiff"] ~long:"print-using-diff" ~default:true
"Highlight the difference w.r.t. the previous prop when printing symbolic execution debug info"
@ -2571,6 +2577,8 @@ and print_active_checkers = !print_active_checkers
and print_builtins = !print_builtins
and print_log_identifier = !print_log_identifier
and print_logs = !print_logs
and print_types = !print_types

@ -564,6 +564,8 @@ val print_active_checkers : bool
val print_builtins : bool
val print_log_identifier : bool
val print_logs : bool
val print_types : bool

Loading…
Cancel
Save