package mirage
The MirageOS library operating system
Install
Dune Dependency
Authors
Maintainers
Sources
mirage-4.9.0.tbz
sha256=0c07d59eb52dc3d1506eb4121c4953104a12df79d08a0f0923c9b71e7474a026
sha512=666bf9ee20c9f9de058441f252f4f40ceec6a9ffd00e5cd3b7bfa9532fd65000aeb8a83f9e55586be98d0a86ea72f2dda94e924608135e3d63441359505de58a
doc/src/mirage.devices/reporter.ml.html
Source file reporter.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
open Functoria.DSL open Misc type reporter = job let reporter = Functoria.job let pp_level ppf = function | Some Logs.Error -> Fmt.string ppf "(Some Logs.Error)" | Some Logs.Warning -> Fmt.string ppf "(Some Logs.Warning)" | Some Logs.Info -> Fmt.string ppf "(Some Logs.Info)" | Some Logs.Debug -> Fmt.string ppf "(Some Logs.Debug)" | Some Logs.App -> Fmt.string ppf "(Some Logs.App)" | None -> Fmt.string ppf "None" let default_reporter ?(level = Some Logs.Info) () = let packages = [ package ~min:"3.0.0" ~max:"4.0.0" "mirage-logs" ] in let runtime_args = [ Runtime_arg.v Runtime_arg.logs ] in let connect _ modname = function | [ logs ] -> code ~pos:__POS__ "@[<v 2>let reporter = %s.create () in@ Mirage_runtime.set_level \ ~default:%a %s;@ Logs.set_reporter reporter;@ Lwt.return reporter@]" modname pp_level level logs | _ -> connect_err "log" 1 in impl ~packages ~runtime_args ~connect "Mirage_logs" reporter let no_reporter = let connect _ _ _ = code ~pos:__POS__ "assert false" in impl ~connect "Mirage_runtime" reporter
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>