Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log faster when log level is not high enough #22

Open
UnixJunkie opened this issue Jun 11, 2020 · 2 comments
Open

log faster when log level is not high enough #22

UnixJunkie opened this issue Jun 11, 2020 · 2 comments

Comments

@UnixJunkie
Copy link
Owner

UnixJunkie commented Jun 11, 2020

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
Copy link
Owner Author

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

@UnixJunkie
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant