Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

#70 - implemented new AbstractFactory for PsrLoggerAdapter #99

Merged
merged 7 commits into from
Dec 27, 2019
Merged

#70 - implemented new AbstractFactory for PsrLoggerAdapter #99

merged 7 commits into from
Dec 27, 2019

Conversation

dennybrandes
Copy link
Contributor

@dennybrandes dennybrandes commented Aug 25, 2019

Add feature described in #70

  • Are you creating a new feature?

    • Add documentation for the new feature.
    • Add a CHANGELOG.md entry for the new feature.
  • Is this related to documentation?

@dennybrandes
Copy link
Contributor Author

Documentation is missing. Any suggestion where to place it exactly. There is a part ServiceManager and one for PSR-3. In which of them could we put it in?

@dennybrandes dennybrandes marked this pull request as ready for review August 25, 2019 08:04
@dennybrandes dennybrandes changed the base branch from master to develop August 28, 2019 14:02
@weierophinney
Copy link
Member

@dennybrandes Put the documentation under the ServiceManager section, but reference and link to it from the PSR-3 section.

@michalbundyra michalbundyra added this to the 2.12.0 milestone Dec 2, 2019
@dennybrandes
Copy link
Contributor Author

@weierophinney I added documentation now.

Copy link
Member

@froschdesign froschdesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First: Thanks for adding the documentation! 👍

I added comments with some suggestions for improvement.

@@ -61,3 +61,6 @@ $logger->addProcessor(new Zend\Log\Processor\PsrPlaceholder);
$logger->info('User with email {email} registered', ['email' => 'user@example.org']);
// logs message 'User with email user@example.org registered'
```
## Usage with ServiceManager

For usage with ServiceManager, check this [PsrLoggerAbstractServiceFactory](./service-manager.md#PsrLoggerAbstractServiceFactory).
Copy link
Member

@froschdesign froschdesign Dec 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Use the full name for the service manager here: "zend-servicemanager" to make clear what is meant.
  • All class names must be set in backticks: `PsrLoggerAbstractServiceFactory`
  • Instead of "check this" we should use a formulation like "see the Service Manager Integration section" and set the link on "Service Manager Integration section".
  • For linking to a page in the same the directory it is enough to use the filename without any dots or slashes. (see MkDocs documentation)

@@ -110,6 +110,23 @@ Because the main filter is `Priority`, it can be set directly too:
];
```

## PsrLoggerAbstractServiceFactory

Same as above, you can use PsrLoggerAbstractServiceFactory to create a PSR-3 conform logger.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • This is a different factory and we should add separate description. "Same as above" should be replaced.
  • All class names must be set in backticks: PsrLoggerAbstractServiceFactory
  • A link on "PSR-3 logger" with the target to "PSR-3 Support" page would be good here.

## PsrLoggerAbstractServiceFactory

Same as above, you can use PsrLoggerAbstractServiceFactory to create a PSR-3 conform logger.
Just use following configuration instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"just", "simple", "easy" etc. should be avoided in a (technical) documentation. It's hard to say if it's really easy or simple for everyone.

return [
'service_manager' => [
'abstract_factories' => [
'Zend\Log\PsrLoggerAbstractServiceFactory',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the class name instead of the string.

@weierophinney
Copy link
Member

@dennybrandes I've incorporated the feedback from @froschdesign and pushed back to your branch. Thanks for your contribution!

@weierophinney weierophinney merged commit b2f3f8e into zendframework:develop Dec 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants