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

cohttp/client.ml logs on the default source application #1103

Open
arvidj opened this issue Feb 5, 2025 · 0 comments
Open

cohttp/client.ml logs on the default source application #1103

arvidj opened this issue Feb 5, 2025 · 0 comments

Comments

@arvidj
Copy link

arvidj commented Feb 5, 2025

Unless I'm mistaken, client.ml logs on the default source application here:

https://github.com/mirage/ocaml-cohttp/blob/master/cohttp/src/client.ml#L78

I'm seeing messages like

2025-02-05T12:15:03-00:00 [INFO] <application> POST http://127.0.0.1:8200/

in my logs that seem to stem from this line. I've setup my log reporter to show the source between the angle brackets in order to find the origin of this message. I'd like to filter out these messages, but since the default source is used, I can't. I am using cohttp-eio and perhaps the issue is rather there. Naively, the solution seems to be to add something like

let src = Logs.Src.create "cohttp.client" ~doc:"Cohttp Client"

module Logs = (val Logs.src_log src)

to client.ml.

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

No branches or pull requests

1 participant