logging to stderr/stdout all the time

Reviewed By: jvillard

Differential Revision: D2760069

fb-gh-sync-id: f0f0f8c
master
Sam Blackshear 9 years ago committed by facebook-github-bot-7
parent edcc984158
commit 44de91f84b

@ -676,7 +676,7 @@ let setup_logging () =
DB.create_dir log_dir;
let analyzer_out_file =
if !out_file_cmdline = "" then Filename.concat log_dir analyzer_out_name
else !out_file_cmdline in
else !out_file_cmdline in
let analyzer_err_file =
if !err_file_cmdline = "" then Filename.concat log_dir analyzer_err_name
else !err_file_cmdline in

@ -106,6 +106,9 @@ let get_delayed_prints () =
!delayed_actions
let do_print fmt fmt_string =
F.fprintf fmt fmt_string
let do_print_in_developer_mode fmt fmt_string =
if !Config.developer_mode then
F.fprintf fmt fmt_string
else
@ -113,17 +116,17 @@ let do_print fmt fmt_string =
(** print to the current out stream (note: only prints in developer mode) *)
let out fmt_string =
do_print !current_out_formatter fmt_string
do_print_in_developer_mode !current_out_formatter fmt_string
(** print to the current err stream (note: only prints in developer mode) *)
let err fmt_string =
do_print !current_err_formatter fmt_string
do_print_in_developer_mode !current_err_formatter fmt_string
(** print immediately to standard error (note: only prints in developer mode) *)
(** print immediately to standard error *)
let stderr fmt_string =
do_print F.err_formatter fmt_string
(** print immediately to standard output (note: only prints in developer mode) *)
(** print immediately to standard output *)
let stdout fmt_string =
do_print F.std_formatter fmt_string

@ -74,10 +74,10 @@ val out : ('a, Format.formatter, unit) format -> 'a
(** print to the current err stream (note: only prints in developer mode) *)
val err : ('a, Format.formatter, unit) format -> 'a
(** print immediately to standard error (note: only prints in developer mode) *)
(** print immediately to standard error *)
val stderr : ('a, Format.formatter, unit) format -> 'a
(** print immediately to standard output (note: only prints in developer mode) *)
(** print immediately to standard output *)
val stdout : ('a, Format.formatter, unit) format -> 'a
(** Get the current out formatter *)

Loading…
Cancel
Save