From 7a1f1d93addcf78c8dd1cae5339b477cc4ef4a9d Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Tue, 6 Jun 2017 04:00:18 -0700 Subject: [PATCH] [log] --stats sets debug level to 1 Summary: This is approximately the old behaviour of `--stats`. Reviewed By: dulmarod Differential Revision: D5183664 fbshipit-source-id: 47366cd --- infer/src/base/Config.ml | 10 +++++++--- infer/src/base/Logging.mli | 1 - 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index 3b1bd4203..3c51798cc 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -790,6 +790,7 @@ and ( print_logs, print_types, reports_include_ml_loc, + stats, test, trace_error, write_html, @@ -917,6 +918,11 @@ and ( ~in_help:CLOpt.[Analyze, manual_generic; Capture, manual_generic; Run, manual_generic; Report, manual_generic] "Also log messages to stdout and stderr" + + and stats = + CLOpt.mk_bool ~deprecated:["stats"] ~long:"stats" "Stats mode (debugging)" + ~f:(fun stats -> if stats then set_debug_level 1 else set_debug_level 0; stats) + in let linters_developer_mode = CLOpt.mk_bool_group ~long:"linters-developer-mode" @@ -944,6 +950,7 @@ and ( print_logs, print_types, reports_include_ml_loc, + stats, test, trace_error, write_html, @@ -1505,9 +1512,6 @@ and stacktraces_dir = Used to guide the analysis (only with '-a crashcontext'). See \ tests/codetoanalyze/java/crashcontext/*.json for examples of the expected format." -and stats = - CLOpt.mk_bool ~deprecated:["stats"] ~long:"stats" "Stats mode (debugging)" - and stats_report = CLOpt.mk_path_opt ~long:"stats-report" ~meta:"file" "Write a report of the analysis results to a file" diff --git a/infer/src/base/Logging.mli b/infer/src/base/Logging.mli index 3278feae8..2d764bc8d 100644 --- a/infer/src/base/Logging.mli +++ b/infer/src/base/Logging.mli @@ -43,7 +43,6 @@ val internal_error : ('a, Format.formatter, unit) format -> 'a val external_error : ('a, Format.formatter, unit) format -> 'a val external_warning : ('a, Format.formatter, unit) format -> 'a -(** *) type debug_kind = Analysis | BufferOverrun | Capture | Linters | MergeCapture (** Level of verbosity for debug output. Each level enables all the levels before it. *)