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

Easier & cleaner logging

Open ulugbekna opened this issue 4 years ago • 1 comments

Sets up easier logging facility without passing around the server or a logger callback. Very much a proof of concept.

@rgrinberg What do you think of such a logger? It seems to make logging easier and cleaner. Kind of does what #421 says (?)

I am trying to improve logging generally, which would also include adding support for merlin logs.

ulugbekna avatar Aug 02 '21 14:08 ulugbekna

What do you think of such a logger? It seems to make logging easier and cleaner. Kind of does what #421 says

It's not quite the same. #421 suggests a solution to send logs to the client when outside the fiber. As far as I can tell, this PR does not address this limitation.

The rest of the changes seem OK to me. However, instead of using a global variable you should use a fiber variable to store the logger instance.

rgrinberg avatar Aug 07 '21 20:08 rgrinberg