Adapt to Mirage 4.3.0 changes

This commit is contained in:
Hannes Mehnert 2022-09-26 20:04:15 +02:00
parent e1e8ea7ae0
commit 561564ceea
2 changed files with 3 additions and 7 deletions

View file

@ -17,7 +17,7 @@ depends: [
"mirage-time" {>= "2.0.0"}
"tcpip" {>= "7.0.0"}
"mirage-solo5" {>= "0.9.0"}
"mirage-runtime"
"mirage-runtime" {>= "4.3.0"}
"memtrace-mirage" {>= "0.2.1.2.2"}
"mirage-clock" {>= "4.0.0"}
]

View file

@ -109,9 +109,7 @@ let get_metrics s =
let adjust_log_level s =
let ts =
List.map
(fun s ->
try (fst Mirage_runtime.Arg.log_threshold) s with
Failure err -> `Error ("failure with " ^ s ^ ": " ^ err))
(fun s -> (fst Mirage_runtime.Arg.log_threshold) s)
(String.split_on_char ',' s)
in
let* oks =
@ -122,9 +120,7 @@ let adjust_log_level s =
| `Error msg -> Error msg)
(Ok []) ts
in
Mirage_runtime.set_level
~default:(Option.value (Logs.level ()) ~default:Logs.Info)
oks;
Mirage_runtime.set_level ~default:(Logs.level ()) oks;
Ok `Empty
let enable_of_str s =