Merge pull request 'Adapt to Mirage 4.3.0 changes' (#1) from mirage-4.3.0 into main
Reviewed-on: https://git.robur.io/robur/mirage-monitoring/pulls/1
This commit is contained in:
commit
36efee2f99
2 changed files with 3 additions and 7 deletions
|
@ -17,7 +17,7 @@ depends: [
|
||||||
"mirage-time" {>= "2.0.0"}
|
"mirage-time" {>= "2.0.0"}
|
||||||
"tcpip" {>= "7.0.0"}
|
"tcpip" {>= "7.0.0"}
|
||||||
"mirage-solo5" {>= "0.9.0"}
|
"mirage-solo5" {>= "0.9.0"}
|
||||||
"mirage-runtime"
|
"mirage-runtime" {>= "4.3.0"}
|
||||||
"memtrace-mirage" {>= "0.2.1.2.2"}
|
"memtrace-mirage" {>= "0.2.1.2.2"}
|
||||||
"mirage-clock" {>= "4.0.0"}
|
"mirage-clock" {>= "4.0.0"}
|
||||||
]
|
]
|
||||||
|
|
|
@ -109,9 +109,7 @@ let get_metrics s =
|
||||||
let adjust_log_level s =
|
let adjust_log_level s =
|
||||||
let ts =
|
let ts =
|
||||||
List.map
|
List.map
|
||||||
(fun s ->
|
(fun s -> (fst Mirage_runtime.Arg.log_threshold) s)
|
||||||
try (fst Mirage_runtime.Arg.log_threshold) s with
|
|
||||||
Failure err -> `Error ("failure with " ^ s ^ ": " ^ err))
|
|
||||||
(String.split_on_char ',' s)
|
(String.split_on_char ',' s)
|
||||||
in
|
in
|
||||||
let* oks =
|
let* oks =
|
||||||
|
@ -122,9 +120,7 @@ let adjust_log_level s =
|
||||||
| `Error msg -> Error msg)
|
| `Error msg -> Error msg)
|
||||||
(Ok []) ts
|
(Ok []) ts
|
||||||
in
|
in
|
||||||
Mirage_runtime.set_level
|
Mirage_runtime.set_level ~default:(Logs.level ()) oks;
|
||||||
~default:(Option.value (Logs.level ()) ~default:Logs.Info)
|
|
||||||
oks;
|
|
||||||
Ok `Empty
|
Ok `Empty
|
||||||
|
|
||||||
let enable_of_str s =
|
let enable_of_str s =
|
||||||
|
|
Loading…
Reference in a new issue