More_cli
Cmdliner support for more
programs.
val fpath : More.Fpath.t Cmdliner.Arg.conv
fpath
is a converter for file paths. No existence is performed, completes both directories and files.
val cmd : More.Cmd.t Cmdliner.Arg.conv
cmd
is a converter for commands parsed with Cmd.of_string
. Completes files.
val log_setup :
?spawns:More.Log.level ->
?absent:More.Log.level ->
?docs:Cmdliner.Manpage.section_name ->
?env:Cmdliner.Cmd.Env.info ->
unit ->
unit Cmdliner.Term.t
log_setup
is a cli interface for specifying a logging level with various options and setting up More.Log.set_level
and More.Os.Cmd.spawn_tracer
with it.
The default value of absent
is Log.Warning
and the default value of spawns
is Log.Debug
. The default value of env
is a LOG_LEVEL
environment variable.
Warning. If level < log_spawn
but More.Log.level
is increased after this call, the spawns won't be traced (most cli programs do not change after the initial setup). Do your own setup if that is a problem for you.