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

Few questions #1

Open
n-valverde opened this issue Nov 8, 2023 · 2 comments · Fixed by #2
Open

Few questions #1

n-valverde opened this issue Nov 8, 2023 · 2 comments · Fixed by #2

Comments

@n-valverde
Copy link

Hey @alexandre-daubois :), hope you're doing well!

I have a few questions:

  • Is there any advantage for BacktraceProcessor vs monolog includeStacktraces feature?
  • Is there any advantage for UuidProcessor vs monolog's UidProcessor?
  • ProtocolVersionProcessor/IsHttpsProcessor: maybe that could make a good addition for monolog's WebProcessor, wdyt?
  • Not really a question, but I think dealing with log level within the processor is wrong, log level is a concern for handlers within monolog, so the processors won't be called if the handler it is attached to does not handle due to log level
@alexandre-daubois
Copy link
Owner

alexandre-daubois commented Nov 8, 2023

Hi Nicolas, I'm doing good, thanks! 😃

  • I actually didn't know about includeStacktraces! It seems it has to be configured on formatter level, which requires a bit more config it seems than just declaring the processor as a service (in the case of Symfony). I added a configurable limit to this processor, which I'm not sure it is present with the includeStacktraces. But I may be totally wrong here 😄
  • I'm using UUID v7 in my processor. I like the fact that it is timestamptable and follows UUID specs. It doesn't seem the case with Monolog's UidProcessor?
  • It could, I'll have a look!
  • You're definitely right. I removed this bit, it seems really important to me to not mix responsibilities here.

And thank you very much for taking time to write this and help with your feedback!

@n-valverde
Copy link
Author

  • It's one of my favorite monolog features 😄 . It's partially correct ^^, include_stacktraces is an option at the handler level (see monolog-bundle), which use IntrospectionProcessor to add the trace, and formatters indeed also deal with the trace but just because the trace may need a different formatting. I think there is already sort of a limit with $skipStackFramesCount constructor arg of the IntrospectionProcessor
  • Alright. I personally don't see the benefit since this id just serves the purpose of log reconciliation, but why not ^^. (Also this has the drawback of adding the dependency of symfony/uid)
  • (This one actually accepts some $extraFields, may be useful on its own, I think I never used it tho ^^)
  • Actually IntrospectionProcessor do check the log level, so I guess there is some legitimate use cases, but it's defaulting to debug, so I guess you could do something similar if you feel it's relevant

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