forked from facebook/pyre-check
-
Notifications
You must be signed in to change notification settings - Fork 0
/
log.mli
57 lines (46 loc) · 1.52 KB
/
log.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
(** Copyright (c) 2016-present, Facebook, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree. *)
type section = [
| `Check
| `Coverage
| `Debug
| `Dependencies
| `DependencyGraph
| `Dotty
| `Dump
| `Environment
| `Error
| `Event
| `Fixpoint
| `Info
| `Interprocedural
| `Memory
| `Parser
| `Performance
| `Progress
| `Protocols
| `Server
| `Taint
| `Warning
]
val is_enabled: section -> bool
(* Setup the logging environment where `sections` is a list of sections that are
enabled. *)
val initialize: verbose: bool -> sections: string list -> unit
val initialize_for_tests: unit -> unit
val log: section: section -> ('a, Format.formatter, unit, unit, unit, unit) Core.format6 -> 'a
val debug: ('a, Format.formatter, unit, unit, unit, unit) Core.format6 -> 'a
val dump: ('a, Format.formatter, unit, unit, unit, unit) Core.format6 -> 'a
val info: ('a, Format.formatter, unit, unit, unit, unit) Core.format6 -> 'a
val error: ('a, Format.formatter, unit, unit, unit, unit) Core.format6 -> 'a
val warning: ('a, Format.formatter, unit, unit, unit, unit) Core.format6 -> 'a
(* Logs directly to the standard output. *)
val print: ('a, Stdio.Out_channel.t, Base.unit) Base.format -> 'a
val log_unix_error: ?section: section -> (Unix.error * string * string) -> unit
module Color : sig
val cyan: string -> string
val red: string -> string
val yellow: string -> string
end
val rotate: ?number_to_keep: int -> string -> string