(* Thread-safe flexible message/log facility *) (* by Travis Bemann *) (* *) (* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public *) (* License as published by the Free Software Foundation; either *) (* version 2 of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU Lesser General Public License for more details. *) type msg_type = Msg_info of int | Msg_error | Msg_debug class type log_type = object method log : msg_type -> string -> unit end class log_null : log_type class log_channel : channel:out_channel -> verbosity:int -> debug:bool -> prefix_info:string -> prefix_error:string -> prefix_debug:string -> log_type class log_stamp_channel : channel:out_channel -> verbosity:int -> debug:bool -> prefix_info:string -> prefix_error:string -> prefix_debug:string -> log_type