package dkml-install

  1. Overview
  2. Docs
API and registry for DkML installation components

Install

Dune Dependency

Authors

Maintainers

Sources

src.tar.gz
md5=4636532b5971d7aa058b492448b02908
sha512=66e28e6c47b3de638601f0002289849d9af6bcbb9a2eb816d1dfe640bf3e5a350ad16b99d88b474b7be2482de480b5dd1fad4dbf87c702ee421bc033a3ca1327

doc/src/dkml-install.api/log_config.ml.html

Source file log_config.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
type t = {
  log_config_style_renderer : Fmt.style_renderer option;
  log_config_level : Logs.level option;
}
(** the type of log configuration *)

(** [create ?log_config_style_renderer ?log_config_level ()] creates log configuration *)
let create ?log_config_style_renderer ?log_config_level () =
  { log_config_style_renderer; log_config_level }

(** [to_args] translates the configuration to a string array *)
let to_args { log_config_style_renderer; log_config_level } =
  let color =
    match log_config_style_renderer with
    | None -> "auto"
    | Some `None -> "never"
    | Some `Ansi_tty -> "always"
  in
  [|
    "--verbosity=" ^ Logs.level_to_string log_config_level; "--color=" ^ color;
  |]
OCaml

Innovation. Community. Security.