Permalink
Browse files

Use BatIO.output instead of out_channel in batLogger

  • Loading branch information...
1 parent ad491e4 commit f393e2719a6d931f2d1c080aa1138ff1fd3daf1c @thelema thelema committed Feb 11, 2010
Showing with 6 additions and 6 deletions.
  1. +3 −3 src/batLogger.ml
  2. +3 −3 src/batLogger.mli
View
@@ -26,7 +26,7 @@
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************)
-open Printf
+open BatPrintf
type log = {
name : string;
@@ -116,7 +116,7 @@ let make_std_formatter oc lm lev (event_name, event_args) timestamp =
(*L:*) (name_of_level lev)
format_kvl event_args
-let stderr_formatter = make_std_formatter stderr
+let stderr_formatter = make_std_formatter BatIO.stderr
let null_formatter lm lev event timestamp = ()
@@ -132,7 +132,7 @@ let make_dbg_formatter oc lm lev (event_name, event_args) timestamp =
(log_name lm) event_name
format_kvl args (name_of_level lev)
-let dbg_formatter lm lev ep ts = make_dbg_formatter stderr lm lev ep ts
+let dbg_formatter lm lev ep ts = make_dbg_formatter BatIO.stderr lm lev ep ts
(******************************************************************************)
(** log events *)
View
@@ -114,7 +114,7 @@ val register_formatter : string -> formatter -> unit
val unregister_formatter : string -> unit
(** [unregister_formatter name] unregisters a named log formatter. *)
-val make_std_formatter : out_channel -> formatter
+val make_std_formatter : 'a BatIO.output -> formatter
(** [make_std_formatter oc] constructs a formatter from an output
channel. This formatter will format log events as
tab-separated [<keyword>:<value>] pairs. The resulting
@@ -145,7 +145,7 @@ val null_formatter : formatter
(** [null_formatter] is a formatter that does not output any
events, but simply discards them. *)
-val make_dbg_formatter : out_channel -> formatter
+val make_dbg_formatter : 'a BatIO.output -> formatter
(** [make_dbg_formatter oc] constructs a debug formatter from an
output channel. The debug formatter outputs simplified format
that is easier to read for debugging purposes and displays
@@ -207,7 +207,7 @@ val level_of_name : string -> level
val name_of_level : level -> string
(** [name_of_level level] returns the name of the specified [level]. *)
-val format_timestamp : out_channel -> float -> unit
+val format_timestamp : 'a BatIO.output -> float -> unit
(** [format_timestamp oc timestamp] prints an ISO-8601 formatted
timestamp (extended to specify higher-resolution seconds) to
the output channel, [oc]. *)

0 comments on commit f393e27

Please sign in to comment.