-
Notifications
You must be signed in to change notification settings - Fork 51
Fixed example with priority in service manager. #82
Fixed example with priority in service manager. #82
Conversation
bbc990f
to
cc7fdbe
Compare
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 remove the entire notes.
Thanks in advance!
doc/book/service-manager.md
Outdated
@@ -73,6 +82,21 @@ the configuration (`MyLogger`): | |||
$logger = $container->get('MyLogger'); | |||
``` | |||
|
|||
Notes: | |||
|
|||
- The keys of the writers are not required, but they make the merge of the |
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.
…they make the merge of the config files easier.
For whom? For the script or user or something else? Very confusing!
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.
Ok, I remove this part.
doc/book/service-manager.md
Outdated
'name' => 'stream', | ||
'priority' => Logger::DEBUG, | ||
'priority' => 1, |
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 correct constant with namespace here.
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.
Ok, but it should be indicated that this priority is only a priority in the queue and it is inversed: so "1" (alert, default for the logger) will be triggered after the "7" (debug).
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.
@Daniel-KM
Please do not forget the topic of this chapter "Service Manager Integration". So this is the wrong place to explain this.
Don't get me wrong, this information is important, but not in this chapter of documentation.
If you are looking for this information, would you search in the chapter "Service Manager Integration"? I do not think so.
doc/book/service-manager.md
Outdated
config files easier. The same remark can be made for the list of processors, | ||
filters, etc. | ||
|
||
- The key `priority` next to the key `name` should not be mingled with the |
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 already explained in the introduction: https://docs.zendframework.com/zend-log/intro/#using-built-in-priorities
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.
Here, this is an application of this definition. And the difference between the priority in the queue and the priority as a severity filter should be explained.
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.
@Daniel-KM
See my comment above.
'options' => [ | ||
'stream' => 'php://output', | ||
'formatter' => [ | ||
'name' => 'MyFormatter', | ||
], | ||
'filters' => [ | ||
[ | ||
'name' => 'MyFilter', | ||
'priority' => [ |
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.
Better than the old version! 👍
doc/book/service-manager.md
Outdated
'name' => 'stream', | ||
'priority' => Logger::DEBUG, | ||
'priority' => 1, | ||
'options' => [ | ||
'stream' => 'php://output', | ||
'formatter' => [ | ||
'name' => 'MyFormatter', |
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.
Can you replace it with a concrete example like the filters? Thanks!
I added a sample for the short format. In fact, I may be better to write the short format (single value) before the extended one (full array), but it is another subject. |
I moved the explanation into the page |
Fixed example with priority in service manager.
Thanks, @Daniel-KM! |
The priority in the queue and in the filter are mingled, so this fixes the example and add a remark.