package b0
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=dadde8cfa62be9dabd805fc190b415427b4699ffe3458c153e2f3f9cc5c9b9b4
md5=f96ac96fb0182f2b97dbe9ded452544b
doc/b0.care/B0_ui/Cli/B0_std/index.html
Module Cli.B0_std
B0_std
configuration.
Configure B0_std
's colored output and B0_std.Log
verbosity.
Cli arguments
val color :
?docs:string ->
?env:Cmdliner.Arg.env ->
unit ->
B0_std.Tty.cap option Cmdliner.Term.t
color ~docs ~env
is a cli interface for specifiying the color capability of the terminal. Can be used with Fmt.set_tty_styling_cap
. docs
is where the options are documented env
is an environment variable that can be used to override the default None
(auto configuration).
val verbosity :
?docs:string ->
?env:Cmdliner.Arg.env ->
unit ->
B0_std.Log.level Cmdliner.Term.t
verbosity ~docs ~env ()
is a cli interface for specifiying the logging level. Can be used with Log.set_level
. docs
is where the options are documented. env
is an environment variable that can be used to override the default value (Log.Warning
).
val setup :
?docs:string ->
?log_spawns:B0_std.Log.level ->
?color_env:Cmdliner.Arg.env ->
?verbosity_env:Cmdliner.Arg.env ->
unit ->
unit Cmdliner.Term.t
setup ~docs ~log_spawns ~color_env ~verbosity_env ()
uses color
and verbosity
to setup:
B0_std.Fmt.set_tty_styling_cap
, usingTty.of_fd
onUnix.stdout
ifcolor
isNone
.B0_std.Log.set_level
withverbosity
.log_spawns
logB0_std.Os.Cmd
spawns by setting up aB0_std.Os.Cmd.spawn_tracer
that traces with the given level. IfLevel.Quiet
is specified no tracer is registered. Defaults toB0_std.Log.Debug
.
docs
is where the section in which the options are documented and color_env
and verbosity_env
are used with the env
argument of color
and verbosity
.