-
Notifications
You must be signed in to change notification settings - Fork 51
#70 - implemented new AbstractFactory for PsrLoggerAdapter #99
#70 - implemented new AbstractFactory for PsrLoggerAdapter #99
Conversation
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 Put the documentation under the ServiceManager section, but reference and link to it from the PSR-3 section. |
@weierophinney I added documentation now. |
There was a problem hiding this 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.
docs/book/psr3.md
Outdated
@@ -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). |
There was a problem hiding this comment.
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)
docs/book/service-manager.md
Outdated
@@ -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. |
There was a problem hiding this comment.
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.
docs/book/service-manager.md
Outdated
## PsrLoggerAbstractServiceFactory | ||
|
||
Same as above, you can use PsrLoggerAbstractServiceFactory to create a PSR-3 conform logger. | ||
Just use following configuration instead. |
There was a problem hiding this comment.
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.
docs/book/service-manager.md
Outdated
return [ | ||
'service_manager' => [ | ||
'abstract_factories' => [ | ||
'Zend\Log\PsrLoggerAbstractServiceFactory', |
There was a problem hiding this comment.
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.
@dennybrandes I've incorporated the feedback from @froschdesign and pushed back to your branch. Thanks for your contribution! |
This patch incorporates feedback from @froschdesign.
Add feature described in #70
Are you creating a new feature?
CHANGELOG.md
entry for the new feature.Is this related to documentation?