module Log:sig
..end
type
kind =
| |
Result |
| |
Feedback |
| |
Debug |
| |
Warning |
| |
Error |
| |
Failure |
type
event = {
|
evt_kind : |
|||
|
evt_plugin : |
|||
|
evt_category : |
(* |
message or warning category
| *) |
|
evt_source : |
|||
|
evt_message : |
type'a
pretty_printer =?current:bool ->
?source:Filepath.position ->
?emitwith:(event -> unit) ->
?echo:bool ->
?once:bool ->
?append:(Format.formatter -> unit) ->
('a, Format.formatter, unit) Pervasives.format -> 'a
current
is false
(default for most of the channels),
no location is output. When it is true
, the last registered location
is used as current (see Cil_const.CurrentLoc
).source
is the location to be output. If nil, current
is used to
determine if a location should be outputemitwith
function which is called each time an event is processedecho
is true
if the event should be output somewhere in addition
to stdout
append
adds some actions performed on the formatter after the event
has been processed.type('a, 'b)
pretty_aborter =?current:bool ->
?source:Filepath.position ->
?echo:bool ->
?append:(Format.formatter -> unit) ->
('a, Format.formatter, unit, 'b) Pervasives.format4 -> 'a
exception AbortError of string
exception AbortFatal of string
exception FeatureRequest of string * string
not_yet_implemented
.
You may catch FeatureRequest(p,r)
to support degenerated behavior.
The responsible plugin is 'p' and the feature request is 'r'.typeontty =
[ `Feedback | `Message | `Silent | `Transient ]
type
warn_status =
| |
Winactive |
(* |
nothing is emitted.
| *) |
| |
Wfeedback_once |
(* |
combines feedback and once.
| *) |
| |
Wfeedback |
(* |
emit a feedback message.
| *) |
| |
Wonce |
(* |
emit a warning message, but only the first time the category
is encountered.
| *) |
| |
Wactive |
(* |
emit a warning message.
| *) |
| |
Werror_once |
(* |
combines once and error.
| *) |
| |
Werror |
(* |
emit a message. Execution continues, but exit status will not be 0
| *) |
| |
Wabort |
(* |
emit a message and abort execution
| *) |
module type Messages =sig
..end
val evt_category : event -> string list
val split_category : string -> string list
"*"
is considered as empty, and ""
categories are skipped.val is_subcategory : string list -> string list -> bool
is_subcategory a b
checks whether a
is a sub-category of b
.
Indeed, it checks whether b
is a prefix of a
, that is,
that a
equals b
or refines b
with (a list of) sub-category(ies).module Register:functor (
P
:
sig
val channel :string
val label :string
val verbose_atleast :int -> bool
val debug_atleast :int -> bool
end
) ->
Messages
val set_echo : ?plugin:string -> ?kind:kind list -> bool -> unit
val add_listener : ?plugin:string -> ?kind:kind list -> (event -> unit) -> unit
val echo : event -> unit
val notify : event -> unit
type
channel
val new_channel : string -> channel
val log_channel : channel -> ?kind:kind -> 'a pretty_printer
val kernel_channel_name : string
val kernel_label_name : string
val source : file:Filepath.Normalized.t -> line:int -> Filepath.position
file
val get_current_source : unit -> Filepath.position
val clean : unit -> unit
val null : Format.formatter
val nullprintf : ('a, Format.formatter, unit) Pervasives.format -> 'a
Pretty_utils
instead.val with_null : (unit -> 'b) -> ('a, Format.formatter, unit, 'b) Pervasives.format4 -> 'a
Pretty_utils
instead.val set_output : ?isatty:bool -> (string -> int -> int -> unit) -> (unit -> unit) -> unit
val print_on_output : (Format.formatter -> unit) -> unit
Can not be recursively invoked.
Since Beryllium-20090901
Change in Nitrogen-20111001: signature changed
Consult the Plugin Development Guide for additional details.
val print_delayed : (Format.formatter -> unit) -> unit
print_on_output
, except
that message echo is not delayed until text material is actually
written. This gives an chance for formatters to emit messages
before actual pretty printing.
Can not be recursively invoked.
Since Beryllium-20090901
Change in Nitrogen-20111001: signature changed
Consult the Plugin Development Guide for additional details.