package migra
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
A database migration tool for OCaml supporting PostgreSQL, MariaDB, and SQLite
Install
dune-project
Dependency
Authors
Maintainers
Sources
migra-1.0.0.tbz
sha256=08ceb8f21f00227f21209484ef1eb8cc326ed26a280747798ec5b0b7c5fdd678
sha512=70050833623ba7801a0a31b1700f5473903335c8db2cdf4de5bbd1876180ec0a93907444b42f7a39b6af454303e0ee5f4c3543ca51378d6324583a26b93f535c
doc/src/migra.engine/logging.ml.html
Source file logging.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 32 33 34 35 36(** Logging configuration for Migra. *) (** Setup logging with timestamps. This is called automatically when the library loads. You typically don't need to call this manually. *) let setup () = (* Check if the default nop reporter is still active *) let current_reporter = Logs.reporter () in if current_reporter == Logs.nop_reporter then (* No reporter set up yet, install ours *) begin Fmt_tty.setup_std_outputs (); let pp_header ppf (l, h) = let timestamp = Unix.gettimeofday () in let tm = Unix.localtime timestamp in let frac = int_of_float ((timestamp -. floor timestamp) *. 1000.) in let header = match h with Some h -> h | None -> "migra" in Fmt.pf ppf "%02d.%02d.%02d %02d:%02d:%02d.%03d %15s %a " (tm.tm_year mod 100) (tm.tm_mon + 1) tm.tm_mday tm.tm_hour tm.tm_min tm.tm_sec frac header Logs.pp_level l in let reporter = Logs_fmt.reporter ~pp_header () in Logs.set_reporter reporter; Logs.set_level (Some Logs.Info); () end else (* Reporter already exists, respect the existing configuration *) () (** Set the minimum log level. *) let set_level level = Logs.set_level (Some level) (* Automatically initialize logging when the library is loaded *) let () = setup ()
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>