Add a clean logger infrastructure.
[tatoo.git] / src / eval.ml
index d90be92..575ee09 100644 (file)
@@ -14,7 +14,7 @@
 (***********************************************************************)
 
 (*
-  Time-stamp: <Last modified on 2013-04-25 11:20:58 CEST by Kim Nguyen>
+  Time-stamp: <Last modified on 2013-04-25 15:12:45 CEST by Kim Nguyen>
 *)
 
 INCLUDE "utils.ml"
@@ -145,7 +145,8 @@ END
       if not (Bitvector.unsafe_get run.unstable i) then
         incr count
     done;
-    eprintf "@[STATS: %i nodes over %i were skipped in iteration %i (%.2f %%), redo is: %b@]@."
+    Logger.msg `STATS
+      "%i nodes over %i were skipped in iteration %i (%.2f %%), redo is: %b"
       !count len run.pass (100. *. (float !count /. float len))
       run.redo
 
@@ -170,7 +171,7 @@ END
       stats run;
       run.pass <- run.pass + 1;
     done;
-    at_exit (fun () -> eprintf "@[STATS: %i iterations@]@." run.pass);
+    at_exit (fun () -> Logger.msg `STATS "%i iterations" run.pass);
     at_exit (fun () -> stats run);
     let r = get_results auto tree node run.config in