mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-27 16:45:50 +03:00
[GH-ISSUE #672] Improve extensability of Monolog/Formatter/HtmlFormatter.php #249
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#249
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @azine on GitHub (Oct 23, 2015).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/672
Hi,
I use the HtmlFormatter to send Emails of error-messages to my inbox. But I wanted to add some custom stuff in the html => overwrite the "format" function.
I saw that the "private" modifiers of the functions "addRow" and "addTitle" and of the field "$logLevels" force anyone who wants to change/overwrite the "format" function to also implement these functions and the array.
Changing the modifiers to "protected" would remove this "duplicate code".
Please consider changing the modifiers to "protected" for:
Thanx for your bundle!
Best regards,
Dominik
@Seldaek commented on GitHub (Oct 24, 2015):
I agree for logLevels, and changed that in
github.com/Seldaek/monolog@3d779cc34d- but for addTitle/addRow IMO they are really implementation specific and if you want to change the look of the email you'd better implement your whole layout. Otherwise we can't really change the way the email looks anymore without keeping the addRow/addTitle concept which is very dependent on the current style and layout of the email.Another approach would be to override format(), and first call parent::format() and then modify/append things to the result before returning it.