diff --git a/infer/src/base/Logging.ml b/infer/src/base/Logging.ml index 1f70b48d5..27997aae7 100644 --- a/infer/src/base/Logging.ml +++ b/infer/src/base/Logging.ml @@ -163,6 +163,8 @@ let log ~to_console ?(to_file= true) (lazy formatters) = let debug_file_fmts = register_formatter "debug" +let debug_dev_file_fmts = register_formatter "local debug" + let environment_info_file_fmts = register_formatter "environment" let external_warning_file_fmts = register_formatter "extern warn" @@ -218,6 +220,8 @@ let debug_level_of_int n = if n <= 0 then Quiet else if Int.equal n 1 then Medium else (* >= 2 *) Verbose +let debug_dev fmt = log ~to_console:true debug_dev_file_fmts fmt + let analysis_debug_level = debug_level_of_int Config.debug_level_analysis let bufferoverrun_debug_level = debug_level_of_int Config.bo_debug diff --git a/infer/src/base/Logging.mli b/infer/src/base/Logging.mli index ffbbb660c..9cb7de883 100644 --- a/infer/src/base/Logging.mli +++ b/infer/src/base/Logging.mli @@ -63,6 +63,13 @@ type debug_level = val debug : debug_kind -> debug_level -> ('a, F.formatter, unit) format -> 'a (** log debug info *) +val debug_dev : ('a, Format.formatter, unit) format -> 'a + [@@deprecated + "Only use to debug during development. If you want more permanent logging, use \ + [Logging.debug] instead."] +[@@warning "-32"] +(** For debugging during development. *) + (** Type of location in ml source: __POS__ *) type ocaml_pos = string * int * int * int