1(*
2 * Copyright (C) 2012      Citrix Ltd.
3 * Author Ian Campbell <ian.campbell@citrix.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published
7 * by the Free Software Foundation; version 2.1 only. with the special
8 * exception on linking described in file LICENSE.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 * GNU Lesser General Public License for more details.
14 *)
15
16(* @@XTL_LEVELS@@ *)
17
18val level_to_string : level -> string
19val compare_level : level -> level -> int
20
21type handle
22
23(** call back arguments. See xentoollog.h for more info.
24    vmessage:
25      level: level as above
26      errno: Some <errno> or None
27      context: Some <string> or None
28      message: The log message (already formatted)
29    progress:
30      context: Some <string> or None
31      doing_what: string
32      percent, done, total.
33*)
34type logger_cbs = {
35	vmessage : level -> int option -> string option -> string -> unit;
36	progress : string option -> string -> int -> int64 -> int64 -> unit;
37	(*destroy : handle -> unit*)
38}
39
40external test: handle -> unit = "stub_xtl_test"
41
42val create : string -> logger_cbs -> handle
43
44