package bap-std

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

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.