Installs pre-commit hooks for OCaml projects that run dune fmt automatically
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vlog: Add structured JSON logging with base fields

- json-logs: Add ~app, ~auto, ~base parameters for base fields
- json-logs: Auto-include hostname and pid in JSON output
- vlog: Add --log-tag KEY=VALUE flag for custom base tags
- vlog: Use json-logs by default, allow disabling with ~json_reporter:None
- Update meross, matter, mdns, claude-skills, precommit to use vlog

JSON output now includes automatic fields (hostname, pid, app) plus
any custom tags from --log-tag flags, useful for log aggregation.

+6 -2
+1 -1
bin/dune
··· 1 1 (executable 2 2 (name main) 3 3 (public_name precommit) 4 - (libraries precommit cmdliner eio_main)) 4 + (libraries precommit cmdliner eio_main vlog))
+5 -1
bin/main.ml
··· 218 218 `P 219 219 "$(tname) installs git hooks that enforce code formatting and commit \ 220 220 message hygiene for OCaml projects."; 221 + `S "ENVIRONMENT"; 222 + `P 223 + "$(b,PRECOMMIT_LOG) can be set to configure logging levels (e.g., \ 224 + $(b,debug) or $(b,info))."; 221 225 `S Manpage.s_bugs; 222 226 `P "Report issues at https://github.com/gazagnaire.org/ocaml-precommit"; 223 227 `S "EXIT STATUS"; ··· 226 230 ] 227 231 in 228 232 let info = Cmd.info "precommit" ~version:"0.1.0" ~doc ~man in 229 - let default = Term.(ret (const (`Help (`Pager, None)))) in 233 + let default = Vlog.setup "precommit" in 230 234 Cmd.group info ~default [ init_cmd; status_cmd; check_cmd ] 231 235 232 236 let () = exit (Cmd.eval main_cmd)