ocaml-cohttp icon indicating copy to clipboard operation
ocaml-cohttp copied to clipboard

feature request: structured log

Open Nymphium opened this issue 3 years ago • 3 comments

Now cohttp debug log is so unstructured that it is hard to see in for example datadog. I think it is preferred to use Logs.Tag for several information, url, http method, status, and etc.

Nymphium avatar Apr 26 '22 09:04 Nymphium

Refactoring the code to enable proper logging is high on the list of welcome features. If anybody has the time to put in the work or start a discussion on the design, it would be very welcome

mseri avatar Apr 26 '22 12:04 mseri

Indeed. In particular, we'd prefer to kick out logging from the core of the system. It should be possible to add your own logging in a modular way at the transport layer. We should only be logging protocol level events.

rgrinberg avatar Apr 26 '22 19:04 rgrinberg

It should be possible to add your own logging in a modular way at the transport layer.

Yes, I'm for the statement too, but the both should be done. Even if the logger is inserted moduraly, the information passed is unstructured, the log is still unstructured.

Nymphium avatar Apr 27 '22 07:04 Nymphium