X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fuwobo%2Fsrc%2Focaml%2Fuwobo_logger.ml;h=c2f69eecc80213b415b572450854d297c9c9e472;hb=89262281b6e83bd2321150f81f1a0583645eb0c8;hp=0a27ee2643bd036afd7e55235d0784f0092db783;hpb=f11be914623f936bd18b6419479ea9270a17f6e3;p=helm.git diff --git a/helm/uwobo/src/ocaml/uwobo_logger.ml b/helm/uwobo/src/ocaml/uwobo_logger.ml index 0a27ee264..c2f69eecc 100644 --- a/helm/uwobo/src/ocaml/uwobo_logger.ml +++ b/helm/uwobo/src/ocaml/uwobo_logger.ml @@ -68,13 +68,7 @@ class sysLogger ?(level: priority = `Notice) () = (** non thread safe, a processingLogger is usually instantied locally for each thread *) -class processingLogger = - let html_escape s = (* TODO too naive, use Nethtml.encode instead *) - Pcre.replace ~pat:"<" ~templ:"<" - (Pcre.replace ~pat:">" ~templ:">" - (Pcre.replace ~pat:"&" ~templ:"&" s)) - in - fun () -> +class processingLogger () = object val mutable log_lines: string list = [] method log msg = log_lines <- msg :: log_lines @@ -84,6 +78,6 @@ class processingLogger = "\n%s\n" (String.concat "
\n" - (List.map html_escape (List.rev log_lines))) + (List.map (Netencoding.Url.encode ~plus:false) (List.rev log_lines))) end