Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log messages have no source #60

Open
reynir opened this issue Dec 18, 2024 · 2 comments
Open

Log messages have no source #60

reynir opened this issue Dec 18, 2024 · 2 comments
Assignees

Comments

@reynir
Copy link
Contributor

reynir commented Dec 18, 2024

Log messages from yocaml appear to come from the application. It would, in my opinion, be quite nice if they would have more descriptive names.

[DEBUG][git.mem]: Store cdd9bb65d4cf9bf757941d58b500d9a576df9f87.
[INFO][application]: `./articles/gptar-update.html` has been written

Unfortunately, it doesn't seem to me to be straight forward to plug in a log source in Yocaml_log:

yocaml/lib/core/eff.ml

Lines 101 to 104 in 1fbb78d

type _ Effect.t +=
| Yocaml_log :
([ `App | `Error | `Warning | `Info | `Debug ] * string)
-> unit Effect.t

Unless we are okay with depending on ocaml-logs in the core:

type _ Effect.t +=
  | Yocaml_log : (Logs.Src.t * Logs.level * string) -> unit Effect.t

(Or there is some type magic we can do to plug in a log source in there.. I don't know)

@xhtmlboi
Copy link
Owner

I'm not against depending on ocaml-logs at the core level. Besides, I think we should do a real pass on logs, which aren't very useful or readable :O

I'll leave it open until I find the right approach, but is it urgent?

@xhtmlboi xhtmlboi self-assigned this Dec 18, 2024
@reynir
Copy link
Contributor Author

reynir commented Dec 18, 2024

Thanks! No, it's not super urgent. I was using the log output to debug #61, but I seem to have found the cause (git-kv). It's mainly helpful to sort out log messages by log source when debugging issues. For normal operation I would say it mostly doesn't matter :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants