You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If includeStacktraces could be set in constructor, we don't need to create a custom formatter class for these usages and configure it in framework config files.
The text was updated successfully, but these errors were encountered:
Also, in LineFormatter the constructor accepts parameters that are overwritten by calling method includeStacktraces() ... so, just adding this parameter in the constructor will not be semantically correct.
I would like to know someone else opinion on this one.
I think it could be added. It would still implicitly force allowInlineLineBreaks to true in LineFormatter but that can be documented (and possibly throw if allowInlineLineBreaks=false is passed with includeStacktraces=true)
Monolog version 2
Thank you for this great logging tool!
I wanted to ask,
Why is includeStacktraces an option that cannot be set in constructor in LineFormatter and JsonFormatter?
because we have to call
includeStacktraces()
to enable stacktrace, we need to create an custom formatter just to enable stacktrace in some frameworks.ex.
using JsonFormatter with Laravel
https://github.com/contributte/monolog
note.
If includeStacktraces could be set in constructor, we don't need to create a custom formatter class for these usages and configure it in framework config files.
The text was updated successfully, but these errors were encountered: