Module Sdebug (.ml)

module Sdebug: sig .. end
Logging facilities.
Version: 0.2
Log


Simple log



Log levels


module type Level = sig .. end
module FLevel: 
functor (C : sig
end) -> Level

Medias


module type Media = sig .. end

out_channel as a media


module type Out_channel_media = Media  with type media = out_channel
module FOut_channel_media: 
functor (C : sig
end) -> Out_channel_media

Simple log


module type Log = sig .. end
Type of a logging module.
module FLog: 
functor (L : Level) ->
functor (M : Media) -> Log
Creating a simple logging module.

Some prebuilt logging modules


module Debug_stderr: Log 
module Verbose_stdout: Log 

Colored logs


module type Color_media = sig .. end
type terminal_color = 
| Blue
| Cyan
| Green
| Magenta
| Red
| Yellow
module FOut_channel_media_color: 
functor (L : Level) ->
functor (M : Out_channel_media) -> sig .. end
module type Log_color = sig .. end
Type of a logging module.
module FLog_color: 
functor (L : Level) ->
functor (M : Color_media) -> Log_color
Creating a colored logging module.
module Debug_stderr_color: Log_color 

With classes


class type ['a] media = object .. end
class ['a] log : 'a media -> object .. end
class out_channel_media : Pervasives.out_channel -> [Pervasives.out_channel] media
val stderr : unit -> out_channel_media
val stdout : unit -> out_channel_media
val verbose : Pervasives.out_channel log
val debug : Pervasives.out_channel log
class type [['a, 'color]] color_media = object .. end
class [['a, 'color]] color_log : ('a, 'color) color_media -> object .. end
class color_out_channel_media : Pervasives.out_channel -> [[Pervasives.out_channel, terminal_color]] color_media
val color_stderr : unit -> color_out_channel_media
val color_stdout : unit -> color_out_channel_media
val color_verbose : (Pervasives.out_channel, terminal_color) color_log
val color_debug : (Pervasives.out_channel, terminal_color) color_log