X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2FmatitaLog.ml;h=02afaf9dba54ff1a8ea468751ab6f8f52337d80c;hb=242e171b023f113228c55ad273797c63becf53e6;hp=0b55e831862aff85e565409ea53099a1ba0c68a2;hpb=de9a83f286eee12117fb478ea2db18f7faebac9a;p=helm.git diff --git a/helm/matita/matitaLog.ml b/helm/matita/matitaLog.ml index 0b55e8318..02afaf9db 100644 --- a/helm/matita/matitaLog.ml +++ b/helm/matita/matitaLog.ml @@ -28,15 +28,26 @@ open Printf type log_tag = [ `Debug | `Error | `Message | `Warning ] type log_callback = log_tag -> string -> unit +(* +colors=(black red green yellow blue magenta cyan gray white) +ccodes=(30 31 32 33 34 35 36 37 39) +*) + +let green = "" +let blue = "" +let yellow = "" +let red = "" +let black = "" + let default_callback tag s = let prefix = match tag with - | `Message -> "Info: " - | `Warning -> "Warning: " - | `Error -> "Error: " - | `Debug -> "Debug: " + | `Message -> green ^ "Info: " + | `Warning -> yellow ^ "Warn: " + | `Error -> red ^ "Error: " + | `Debug -> blue ^ "Debug: " in - print_endline (prefix ^ s); + print_endline (prefix ^ black ^ s); flush stdout let callback = ref default_callback