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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

googletorp created an issue. See original summary.

googletorp’s picture

Status: Active » Needs review
FileSize
651 bytes

This is a pretty simple fix.

cilefen’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Needs work

I 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.

priya.chat’s picture

Status: Needs work » Needs review
FileSize
745 bytes

Hello,
I have made some changes into my new patch as directed by Alexpott. Please review it.

Xano’s picture

Status: Needs review » Needs work

We 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.

sudhanshug’s picture

Made the documentation short and precise as pointed in #6. It includes the relevant details i.e adding of logger and is not confusing.

-   * Adds a logger.
-   *
-   * Here is where all services tagged as 'logger' are being added to the
-   * factory and then passed to the channels after instantiation.
+   * Adds a logger to all the channels.
sudhanshug’s picture

Status: Needs work » Needs review
jhodgdon’s picture

Status: Needs review » Needs work
Issue tags: -Quick fix, -Quickfix, -Documentation

Thanks 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!

chx’s picture

Status: Needs work » Reviewed & tested by the community

While @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:

Logger channel factory interface.

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

The channel [...] can also be used to direct different channels to different places/files.

Per https://api.drupal.org/api/drupal/core%21lib%21Drupal.php/function/Drupa...

channel. Can be any string, but the general practice is to use the name of the subsystem calling this.

Per https://www.drupal.org/node/2270941

a "channel" refers to what used to be the $type argument to watchdog().

jhodgdon’s picture

Fair enough.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 7: typo_spelling_error_in-2641430-7.patch, failed testing.

chx’s picture

Status: Needs work » Reviewed & tested by the community

Bot fluke.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 7: typo_spelling_error_in-2641430-7.patch, failed testing.

jhodgdon’s picture

Status: Needs work » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 569bf62 and pushed to 8.0.x and 8.1.x. Thanks!

  • alexpott committed 6f23962 on 8.1.x
    Issue #2641430 by googletorp, sudhanshug, priya.chat: Typo/spelling...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.