dbuenzli / logs

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

Print filename and line number before log #35

Closed anchpop closed 3 years ago

anchpop commented 3 years ago

Sometimes I waste a lot of time tracking down the file that's creating a log. Is there a way to set up a formatter to include the filename and line number that triggered a log?

dbuenzli commented 3 years ago

It's a bit unclear whether you are talking about creating a log or a log entry. I guess you could try to figure out some scheme using these magic values (one of the problem though is that they are hard to use in abstractions).

I suggest you to ask/discuss that question on https://discuss.ocaml.org/ (you can log with your github account) where you will likely get more replies than here.

(I'm closing this but feel free to continue the discussion or post what you came up with).

dbuenzli commented 3 years ago

Post on discuss.