package binsec
Install
Dune Dependency
Authors
-
AAdel Djoudi
-
BBenjamin Farinier
-
CChakib Foulani
-
DDorian Lesbre
-
FFrédéric Recoules
-
GGuillaume Girol
-
JJosselin Feist
-
LLesly-Ann Daniel
-
MMahmudul Faisal Al Ameen
-
MManh-Dung Nguyen
-
MMathéo Vergnolle
-
MMathilde Ollivier
-
MMatthieu Lemerre
-
NNicolas Bellec
-
OOlivier Nicole
-
RRichard Bonichon
-
RRobin David
-
SSébastien Bardin
-
SSoline Ducousso
-
TTa Thanh Dinh
-
YYaëlle Vinçont
-
YYanis Sellami
Maintainers
Sources
sha256=87d4048c9a90c8a14ee029e77d31032a15427f06416a31938cec8a68394234c4
sha512=6a023d2a5c87c56b0aac489874431d8dcccee1451a072a826190be3a7f75a961688bab95f193f494231744abc3bc9733ab5c809057d36a5e4d24c6c29c369144
doc/shadow_stack/Shadow_stack/Logger/index.html
Module Shadow_stack.Logger
Channels
val fatal_channel : channel
val error_channel : channel
val result_channel : channel
val warning_channel : channel
val info_channel : channel
val debug_channel : channel
These predefined channels are flushed after each call and a newline character is inserted.
val fatal : ?e:exn -> ('a, Format.formatter, unit, 'b) format4 -> 'a
For messages that show a fatal failure, In this case, you should not be able to continue and exit code
should follow the emission. Use error
otherwise.
val error : ('a, Format.formatter, unit) format -> 'a
For error messages only.
val result : ('a, Format.formatter, unit) format -> 'a
For important results that will be displayed
val warning : ?level:int -> ('a, Format.formatter, unit) format -> 'a
For warning messages.
val info : ?level:int -> ('a, Format.formatter, unit) format -> 'a
Any info that should be displayed
val debug : ?level:int -> ('a, Format.formatter, unit) format -> 'a
debug ~level:n msg
will be displayed if at least level n + 1 debug is activated
val fdebug :
?level:int ->
(unit -> (unit, Format.formatter, unit) format) ->
unit
fdebug ~level f
acts like like debug ~level msg
where msg = f ()
but lazily evaluates its argument. Use fdebug
instead of debug
if you need to print values that might be hard to compute (and that you therefore compute inside the closure).
set_tagged_entry
Print channel identifiers, like warning
for the warning channel, in front of messages to explicit their origins.
If might not be necessary if you use colors for example.
Set logger to display only messages from that channel and those with higher loglevels.
Valid arguments in increasing order of loglevels are : "debug", "info", "warning", "error", "fatal"/"result".
You cannot turn off fatal_channel
or result_channel
.
val cli_handler : Arg.spec
val channel_set_color : bool -> channel -> unit
set_channel_color b chan
activates (if b
is true
) or deactivates (if b
is false
) the emission of ANSI color tags for terminal.
You might want to deactivate the feature if you plan on analyzing the log in a file for example.
val channel_get_color : channel -> bool
Activate color tags rendering on all outputs.
In your format strings, tags of the form "\@\{<color>format\@\}"
will thus be interpreted.
color
can be any of the following:
- black
- darkgray
- blue
- lightblue
- green
- lightgreen,
- cyan
- lightcyan
- red
- lightred
- purple
- lightpurple
- brown
- yellow
- lightgray
- white
format
is any format string recognized by Format
. For example, after activating color tags Format.printf "\@\{<purple>Hello!\@\}"
will write "Hello!" in purple if your terminal has such features.