]> matita.cs.unibo.it Git - helm.git/blob - helm/uwobo/src/ocaml/uwobo_logger.mli
Initial revision
[helm.git] / helm / uwobo / src / ocaml / uwobo_logger.mli
1
2 (* Copyright (C) 2002, HELM Team.
3  * 
4  * This file is part of HELM, an Hypertextual, Electronic
5  * Library of Mathematics, developed at the Computer Science
6  * Department, University of Bologna, Italy.
7  * 
8  * HELM is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  * 
13  * HELM is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with HELM; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
21  * MA  02111-1307, USA.
22  * 
23  * For details, see the HELM World-Wide-Web page,
24  * http://cs.unibo.it/helm/.
25  *)
26
27 type priority = [
28   | `Emerg    (* system is unusable *)
29   | `Alert    (* action must be taken immediately *)
30   | `Crit     (* critical conditions *)
31   | `Err      (* error conditions *)
32   | `Warning  (* warning conditions *)
33   | `Notice   (* normal, but significant, condition *)
34   | `Info     (* informational message *)
35   | `Debug    (* debug-level message *)
36 ]
37
38   (** @param level minimum level of priority that will be reported, msg with
39   priority less than this will be ignored *)
40 class sysLogger:
41   ?level: priority ->
42   unit ->
43     object
44         (** enable logging, by default logging is disabled *)
45       method enable: unit
46         (** disable logging *)
47       method disable: unit
48         (** log a message *)
49       method log: priority -> string -> unit
50     end
51
52 class processingLogger:
53   unit ->
54     object
55       method log: string -> unit
56       method asText: string
57       method asHtml: string
58     end
59