dbuenzli / logs

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

is there an Lwt_log.file equivalent in Logs ? #20

Closed cedlemo closed 6 years ago

cedlemo commented 6 years ago

Based on this issue https://github.com/ocsigen/lwt/issues/468, it seems that Logs should be preferred over Lwt_log, however after reading the docs, it seems for me (maybe I was not able to understand the doc sorry) that Logs is only for console output and that I can not use it for logging in a file like with Lwt_log.file.

Could you confirm this ?

dbuenzli commented 6 years ago

it seems for me (maybe I was not able to understand the doc sorry) that Logs is only for console output and that I can not use it for logging in a file like with Lwt_log.file.

No. You simply need to write and setup your own reporter. It shouldn't be too hard to tweak this example to make it log to a file.

Btw. I prefer if these questions occur on http://discuss.ocaml.org rather than on the issue tracker.

cedlemo commented 6 years ago

Btw. I prefer if these questions occur on http://discuss.ocaml.org rather than on the issue tracker.

Ok, Thanks.