package codex

  1. Overview
  2. Docs
The Codex library for building static analysers based on abstract interpretation

Install

dune-project
 Dependency

Authors

Maintainers

Sources

1.0-rc4.tar.gz
md5=bc7266a140c6886add673ede90e335d3
sha512=8da42c0ff2c1098c5f9cb2b5b43b306faf7ac93b8f5ae00c176918cee761f249ff45b29309f31a05bbcf6312304f86a0d5a000eb3f1094d3d3c2b9b4c7f5c386

doc/codex.tracelog/Tracelog/index.html

Module TracelogSource

Tracelog is the main logging module for codex.

Instanciate a new logger with Tracelog.Make:

  module Log = Tracelog.Make(struct let category = "MyCategory" end)

You can then use logging functions Log.error, Log.warning, Log.notice, Log.info, and Log.debug (in increasing verbosity level). Additionally, Log.fatal prints and exits. Finally, Log.trace can be used to trace entry/return into a function.

For a short tutorial, see Tracelog Debugging in Codex.

You can change the global level using set_verbosity_level (set to `Notice by default).

Sourcetype 'a printf = ('a, Format.formatter, unit) format -> 'a

A function that behaves like printf.

Sourcetype 'a log = 'a printf -> unit

A log message takes a printf function and print with it. This avoid the need to parse and evaluate arguments when we do not log.

Sourceval set_log_binary_trace : bool -> unit
Sourceval set_verbosity_level : [ `Error | `Warning | `Notice | `Info | `Debug ] -> unit

Verbosity level, from less to most verbose. Default is to display everything below `Warning. Feedback levels are from less to more verbose (normal levels are from 0 to 2, but you can pass bigger numbers.)

Sourceval get_verbosity_level : unit -> [ `Error | `Warning | `Notice | `Info | `Debug ]
Sourcetype location = ..
Sourceval reset_location_stack : unit -> unit

reset the location stack, USE ONLY IF YOU KNOW WHAT YOU ARE DOING

Sourceval current_location : unit -> location option

The innermost location set by trace.

Sourceval current_location_stack : unit -> location list

The current stack of locations set by trace.

Sourceval set_pp_location_stack : (Format.formatter -> location list -> unit) -> unit

If we have location information, it will be printed using this function.

Sourcemodule type S = sig ... end
Sourcemodule Make (Category : sig ... end) : S

Standard functor: verbosity level is controlled by set_verbosity_level.

Sourcemodule MakeDebug (Category : sig ... end) : S

This is useful when developping and debugging a specific module: we can enable debugging forthis module by replacing the Make call by MakeDebug.

Sourcemodule MakeSilent (Category : sig ... end) : S

Completely silence this debug output.

Sourcemodule Dummy : S

Outputs nothing, usefull for developpers who want to hide a domain by simply replacing the usual Log = Make(...) by Log = Dummy