UnixJunkie / dolog

A dumb OCaml logger
Other
37 stars 7 forks source link

log faster when log level is not high enough #22

Open UnixJunkie opened 4 years ago

UnixJunkie commented 4 years ago

dbuenzli's log library (https://github.com/dbuenzli/logs) does this:

Logs.err (fun m -> m "invalid kv (%a,%a)" pp_key k pp_val v);

apparently it allows to skip the formatting of things which are not going to be printed

UnixJunkie commented 4 years ago

maybe we need to extend the current interface in order to support that

UnixJunkie commented 1 year ago

There is a discussion about such tricks there: https://discuss.ocaml.org/t/format-kprintf-usage/1396/18