X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_proof_checking%2FcicLogger.ml;h=6867b8b928314bbbc73226610f30d4a5714a7185;hb=5325734bc2e4927ed7ec146e35a6f0f2b49f50c1;hp=9fc983fc7fec8e9588dd68efc7b28f48491a30f8;hpb=d70688ca1e1bcefc463d3397c6da77b40d055c85;p=helm.git diff --git a/helm/ocaml/cic_proof_checking/cicLogger.ml b/helm/ocaml/cic_proof_checking/cicLogger.ml index 9fc983fc7..6867b8b92 100644 --- a/helm/ocaml/cic_proof_checking/cicLogger.ml +++ b/helm/ocaml/cic_proof_checking/cicLogger.ml @@ -28,39 +28,17 @@ type msg = | `Type_checking_completed of UriManager.uri | `Trusting of UriManager.uri ] -;; -let log_to_html ~print_and_flush = +let log = let module U = UriManager in - let indent = ref 0 in - let mkindent () = - String.make !indent ' ' - in function | `Start_type_checking uri -> - print_and_flush ( - mkindent () ^ - "
" ^ - "Type-Checking of " ^ (U.string_of_uri uri) ^ " started
\n" - ) ; - incr indent + HelmLogger.log (`Msg (`DIV (1, None, `T + ("Type-Checking of " ^ (U.string_of_uri uri) ^ " started")))) | `Type_checking_completed uri -> - decr indent ; - print_and_flush ( - mkindent () ^ - "
" ^ - "Type-Checking of " ^ (U.string_of_uri uri) ^ " completed.
\n" - ) + HelmLogger.log (`Msg (`DIV (1, Some "green", `T + ("Type-Checking of " ^ (U.string_of_uri uri) ^ " completed")))) | `Trusting uri -> - print_and_flush ( - mkindent () ^ - "
" ^ - (U.string_of_uri uri) ^ " is trusted.
\n" - ) -;; + HelmLogger.log (`Msg (`DIV (1, Some "blue", `T + ((U.string_of_uri uri) ^ " is trusted.")))) -let log_callback = ref (function (_:msg) -> ()) -let log msg = !log_callback msg;;