ligo/src/lib_stdlib/logging.mli

52 lines
2.1 KiB
OCaml
Raw Normal View History

2016-09-08 21:13:10 +04:00
(**************************************************************************)
(* *)
2018-02-06 00:17:03 +04:00
(* Copyright (c) 2014 - 2018. *)
2016-09-08 21:13:10 +04:00
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
(* *)
(* All rights reserved. No warranty, explicit or implicit, provided. *)
(* *)
(**************************************************************************)
module type LOG = sig
val debug: ('a, Format.formatter, unit, unit) format4 -> 'a
val log_info: ('a, Format.formatter, unit, unit) format4 -> 'a
val log_notice: ('a, Format.formatter, unit, unit) format4 -> 'a
val warn: ('a, Format.formatter, unit, unit) format4 -> 'a
val log_error: ('a, Format.formatter, unit, unit) format4 -> 'a
val fatal_error: ('a, Format.formatter, unit, unit) format4 -> 'a
2016-09-08 21:13:10 +04:00
val lwt_debug: ('a, Format.formatter, unit, unit Lwt.t) format4 -> 'a
val lwt_log_info: ('a, Format.formatter, unit, unit Lwt.t) format4 -> 'a
val lwt_log_notice: ('a, Format.formatter, unit, unit Lwt.t) format4 -> 'a
val lwt_warn: ('a, Format.formatter, unit, unit Lwt.t) format4 -> 'a
val lwt_log_error: ('a, Format.formatter, unit, unit Lwt.t) format4 -> 'a
2018-01-22 18:25:48 +04:00
val lwt_fatal_error: ('a, Format.formatter, unit, unit Lwt.t) format4 -> 'a
2016-09-08 21:13:10 +04:00
end
module Core : LOG
module Make(S: sig val name: string end) : LOG
2017-01-23 14:09:36 +04:00
type level = Lwt_log_core.level =
| Debug
(** Debugging message. They can be automatically removed by the
syntax extension. *)
2017-01-23 14:09:36 +04:00
| Info
(** Informational message. Suitable to be displayed when the
program is in verbose mode. *)
2017-01-23 14:09:36 +04:00
| Notice
(** Same as {!Info}, but is displayed by default. *)
2017-01-23 14:09:36 +04:00
| Warning
(** Something strange happend *)
2017-01-23 14:09:36 +04:00
| Error
(** An error message, which should not means the end of the
program. *)
2017-01-23 14:09:36 +04:00
| Fatal
type template = Lwt_log.template
val default_template : template
val sections: string list ref