package bap-std

  1. Overview
  2. Docs
The Binary Analysis Platform Standard Library

Install

Dune Dependency

Authors

Maintainers

Sources

v2.5.0.tar.gz
sha256=9c126781385d2fa9b8edab22e62b25c70bf2f99f6ec78abb7e5e36d63cfa4174
md5=5abd9b3628b43f797326034f31ca574f

doc/bap/Bap/Std/Event/Log/index.html

Module Event.Log

Logging event.

type level = Bap_main_event.Log.level =
  1. | Debug
  2. | Info
  3. | Warning
  4. | Error
type info = Bap_main_event.Log.info = {
  1. level : level;
  2. section : string;
  3. message : string;
}
type event +=
  1. | Message of info
val message : level -> section:string -> ('a, Format.formatter, unit) Core_kernel.format -> 'a

message level ~section fmt ... send a message of the specified level and section.

Do not use this function directly, instead include the instantiation of a Self functor, and use corresponding logging functions, e.g.,

  include Self()
  (* ... *)
  info "created some %s" "thing"
type event +=
  1. | Progress of {
    1. task : string;
      (*

      hierarchical task name

      *)
    2. note : string option;
      (*

      a short note

      *)
    3. stage : int option;
      (*

      entered stage

      *)
    4. total : int option;
      (*

      total number of stages

      *)
    }
val progress : ?note:string -> ?stage:int -> ?total:int -> string -> unit

progress ?note ?stage ?total name sends a progress report. This function should be used by the main components only, while plugins should use the report_progress function from the Self() interface. All parameters defaults to None.

OCaml

Innovation. Community. Security.