dbuenzli / logs

Logging infrastructure for OCaml
http://erratique.ch/software/logs
ISC License
86 stars 19 forks source link

Best way to mix Logs.xxx (fun ..) and Printf.printf ? #50

Closed tlh24 closed 1 year ago

tlh24 commented 1 year ago

Hello, and thanks for the nice library ~

For my application, I'd like to output a progress status, eg:

Printf.printf "\r done %d" counter; flush stdout;

But, it seems that Logs 'grabs' stdout and or hides/buffers output (??). Multi-threaded is enabled, though this does not seem to affect behavior.

How to get the two printing methods to play well together?

dbuenzli commented 1 year ago

What happens depends on the reporter you use. So you will likely need to provide more details. In any case as mentioned here, questions should be asked on https://discuss.ocaml.org/ (where you can log with your gh account).