Uses the Logger.print function instead of Printf.eprintf
[SXSI/xpathcomp.git] / src / hcons.ml
index d49061d..5a7ad14 100644 (file)
@@ -59,8 +59,9 @@ struct
   exception Found of t
 
   let stats () =
-    Printf.eprintf "Hconsing statistics";
     let l = WH.fold (fun cell acc -> (Uid.to_int cell.id)::acc) pool [] in
     let l = List.sort compare l in
-    List.iter (fun id -> Printf.eprintf "%i\n" id) l
+    Logger.print Format.err_formatter "Hconsing statistics:@\n%a"
+    (fun ppf l ->
+      Pretty.pp_print_list ~sep:Format.pp_force_newline Format.pp_print_int ppf l) l
 end