module type Messages =sig
..end
type
category
type
warn_category
val verbose_atleast : int -> bool
val debug_atleast : int -> bool
val printf : ?level:int ->
?dkey:category ->
?current:bool ->
?source:Filepath.position ->
?append:(Format.formatter -> unit) ->
?header:(Format.formatter -> unit) ->
('a, Format.formatter, unit) Pervasives.format -> 'a
stdout
. Levels and
key-categories are taken into account like event messages.
The header formatted message is emitted as a regular result
message.val result : ?level:int -> ?dkey:category -> 'a Log.pretty_printer
val feedback : ?ontty:Log.ontty ->
?level:int -> ?dkey:category -> 'a Log.pretty_printer
?dkey
?ontty
val debug : ?level:int -> ?dkey:category -> 'a Log.pretty_printer
set_debug_keys
and set_debug_keyset
.dkey
val warning : ?wkey:warn_category -> 'a Log.pretty_printer
val error : 'a Log.pretty_printer
val abort : ('a, 'b) Log.pretty_aborter
AbortError
with the channel name.val failure : 'a Log.pretty_printer
val fatal : ('a, 'b) Log.pretty_aborter
AbortFatal
with the channel name.val verify : bool -> ('a, bool) Log.pretty_aborter
true
, return true
and do nothing else,
otherwise, send the message on the fatal channel and return
false
.
The intended usage is: assert (verify e "Bla...") ;
.
Since Beryllium-20090601-beta1
Consult the Plugin Development Guide for additional details.
val not_yet_implemented : ('a, Format.formatter, unit, 'b) Pervasives.format4 -> 'a
FeatureRequest
but does not send any message.
If the exception is not caught, Frama-C displays a feature-request
message to the user.val deprecated : string -> now:string -> ('a -> 'b) -> 'a -> 'b
deprecated s ~now f
indicates that the use of f
of name s
is now
deprecated. It should be replaced by now
.val with_result : (Log.event option -> 'b) -> ('a, 'b) Log.pretty_aborter
with_result f fmt
calls f
in the same condition as logwith
.val with_warning : (Log.event option -> 'b) -> ('a, 'b) Log.pretty_aborter
with_warning f fmt
calls f
in the same condition as logwith
.val with_error : (Log.event option -> 'b) -> ('a, 'b) Log.pretty_aborter
with_error f fmt
calls f
in the same condition as logwith
.val with_failure : (Log.event option -> 'b) -> ('a, 'b) Log.pretty_aborter
with_failure f fmt
calls f
in the same condition as logwith
.val log : ?kind:Log.kind -> ?verbose:int -> ?debug:int -> 'a Log.pretty_printer
Result
. Use cases (with
n,m > 0
):log ~verbose:n
: emit the message only when verbosity level is
at least n
.log ~debug:n
: emit the message only when debugging level is
at least n
.log ~verbose:n ~debug:m
: any debugging or verbosity level is
sufficient.val logwith : (Log.event option -> 'b) ->
?wkey:warn_category ->
?emitwith:(Log.event -> unit) -> ?once:bool -> ('a, 'b) Log.pretty_aborter
warn_category
instead of kind
.
logwith continuation ?wkey fmt
similar to warning ?wkey fmt
and then calling the continuation
.
The optional continuation argument refers to the corresponding event.
None
is used iff no message is logged.
In case the wkey
is considered as a Failure
, the continution is not called.
This kind of message denotes a fatal error aborting Frama-C.
Notice that the ~emitwith
action is called iff a message is logged.val register : Log.kind -> (Log.event -> unit) -> unit
val register_tag_handlers : (string -> string) * (string -> string) -> unit
val register_category : string -> category
add_debug_keys
)
after registration.val pp_category : Format.formatter -> category -> unit
val dkey_name : category -> string
val is_registered_category : string -> bool
val get_category : string -> category option
None
if no
such category exists.val get_all_categories : unit -> category list
val add_debug_keys : category -> unit
val del_debug_keys : category -> unit
val get_debug_keys : unit -> category list
val is_debug_key_enabled : category -> bool
true
if the given category is currently activeval get_debug_keyset : unit -> category list
val register_warn_category : string -> warn_category
val is_warn_category : string -> bool
val pp_warn_category : Format.formatter -> warn_category -> unit
val pp_all_warn_categories_status : unit -> unit
val wkey_name : warn_category -> string
val get_warn_category : string -> warn_category option
val get_all_warn_categories : unit -> warn_category list
val get_all_warn_categories_status : unit -> (warn_category * Log.warn_status) list
val set_warn_status : warn_category -> Log.warn_status -> unit
val get_warn_status : warn_category -> Log.warn_status