Shell: still allow usage of LWT_LOG
Commit b869c264aa
introdude `-v level`, which should be equivalent to
setting `LWT_LOG="* -> level`, but it inadvertently drop the support for
`LWT_LOG`. This commit reintroduces support for ` LWT_LOG` which allows
to setup distinct verbosity levels to distinct part of the node :
LWT_LOG="net -> debug ; rpc -> notice"
This commit is contained in:
parent
2a43eeaa7f
commit
62a1be15b7
@ -102,7 +102,7 @@ module Globals = struct
|
||||
sandbox#add_hook sandboxed
|
||||
|
||||
let verbose_param =
|
||||
new string_option_cp ~group:cli_group ["verbosity"] ~short_name:"v" (Some "notice")
|
||||
new string_option_cp ~group:cli_group ["verbosity"] ~short_name:"v" None
|
||||
"Verbosity level (fatal, error, warning, notice, info, debug)"
|
||||
|
||||
(** File options *)
|
||||
@ -233,7 +233,9 @@ let init_logger () =
|
||||
| Some "notice" -> add_rule "*" Notice
|
||||
| Some "info" -> add_rule "*" Info
|
||||
| Some "debug" -> add_rule "*" Debug
|
||||
| _ -> ()
|
||||
| Some level ->
|
||||
Printf.eprintf "Warning: unknown verbosity level \"%s\".\n%!" level
|
||||
| None -> ()
|
||||
end;
|
||||
match Globals.log_kind#get with
|
||||
| "" | "stderr" -> Logging.init Stderr
|
||||
|
Loading…
Reference in New Issue
Block a user