Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Typo/spelling error in LoggerChannelFactoryInterface documentation.
Proposed resolution
We should fix this.
User interface changes
None
API changes
None
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#7 | typo_spelling_error_in-2641430-7.patch | 650 bytes | sudhanshug |
#5 | typo_spelling_error_in-2641430-5.patch | 745 bytes | priya.chat |
#2 | typo_spelling_error_in-2641430-2.patch | 651 bytes | googletorp |
Comments
Comment #2
googletorp CreditAttribution: googletorp as a volunteer and at Reveal IT commentedThis is a pretty simple fix.
Comment #3
cilefen CreditAttribution: cilefen commentedComment #4
alexpottI think this documentation is funny... we're not retrieving anything... we're adding all the the loggers to the factory and any instantiated channels. Let's improve the documentation whilst we're making this change.
Comment #5
priya.chat CreditAttribution: priya.chat at Publicis Sapient for Publicis Sapient commentedHello,
I have made some changes into my new patch as directed by Alexpott. Please review it.
Comment #6
XanoWe should not be talking about services in interfaces, unless those interfaces are directly related to our dependency injection system. The reason for this is that our interfaces are our APIs, which should be decoupled from our application-level logic as much as possible, because our application is built on top of our APIs, and not the other way around.
What about something like Adds a logger to all channels? We can keep it short, because the actual implementation is only relevant on classes, and the service bit is all taken care of by
\Drupal\Core\DependencyInjection\Compiler\TaggedHandlersPass
.Comment #7
sudhanshug CreditAttribution: sudhanshug commentedMade the documentation short and precise as pointed in #6. It includes the relevant details i.e adding of logger and is not confusing.
Comment #8
sudhanshug CreditAttribution: sudhanshug commentedComment #9
jhodgdonThanks for the new patch! That's clear enough, but only assuming that you know what a "channel" is and what "all the channels" means in the context of this interface. Neither of those concepts is explained or even referred to in the interface documentation that I can see, so I really don't think this method's documentation is complete. In other words, I see that it is adding a logger to 'all of the channels' but I don't know what "all the channels" means. So that needs to be clarified.
Also @sudhanshug: In the future, when you attach a patch, please do not also paste the contents of the patch into your comment. Reviewers will already be both looking at the patch file and reading the comment, and if the same information is in both, that is redundant and takes extra time to review. Thanks!
Comment #10
chx CreditAttribution: chx commentedWhile @jhodgdon is right in that our documentation regarding channels are really poor that's out of scope for this issue. It should be on the LoggerChannelFactoryInterface doxygen which is again on ContextInterface levels:
But fixing this needs to be a separate issue. If someone wants to file and write it, the meaning and usage of the channel can be pieced together from the following:
Per http://symfony.com/doc/current/cookbook/logging/channels_handlers.html
Per https://api.drupal.org/api/drupal/core%21lib%21Drupal.php/function/Drupa...
Per https://www.drupal.org/node/2270941
Comment #11
jhodgdonFair enough.
Comment #13
chx CreditAttribution: chx commentedBot fluke.
Comment #15
jhodgdonComment #16
alexpottCommitted 569bf62 and pushed to 8.0.x and 8.1.x. Thanks!