-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Added a note about the rotating_file monolog handler #5137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a note about the rotating_file monolog handler #5137
Conversation
javiereguiluz
commented
Apr 2, 2015
Q | A |
---|---|
Doc fix? | no |
New docs? | yes |
Applies to | all |
Fixed tickets | #1161 |
main: | ||
type: rotating_file # <-- this value is usually 'stream' | ||
path: %kernel.logs_dir%/%kernel.environment%.log | ||
level: 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.
you need to add XML and PHP:
<!-- app/config/config_dev.xml -->
<?xml version="1.0" charset="UTF-8" ?>
<container xmlns=''http://symfony.com/schema/dic/services"
xmlns:monolog="http://symfony.com/schema/dic/monolog">
<monolog:config>
<monolog:handler name="main"
type="rotating_file"
path="%kernel.logs_dir%/%kernel.environment%.log"
level="debug"
/>
</monolog:config>
</container>
// app/config/config_dev.php
$container->loadFromExtension('monolog', array(
'handlers' => array(
'main' => array(
'type' => 'rotating_file',
'path' => '%kernel.logs_dir%/%kernel.environment%.log',
'level' => '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.
Thanks for reminding me about this! Done in 7345c17.
main: | ||
type: rotating_file | ||
path: %kernel.logs_dir%/%kernel.environment%.log | ||
level: 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.
I think we should show max_files
- maybe commented out, with a comment above/on the line that says it defaults to zero (infinite)
and explained the max_files configuration option
I've just implemented the suggestions made by @weaverryan. Can this be considered finished now? |
👍 |
1 similar comment
👍 |
…aviereguiluz) This PR was merged into the 2.3 branch. Discussion ---------- Added a note about the rotating_file monolog handler | Q | A | ------------- | --- | Doc fix? | no | New docs? | yes | Applies to | all | Fixed tickets | #1161 Commits ------- db1e798 Created a new section for rotating log files and explained the max_files configuration option 7345c17 Added XML and PHP configuration samples 31fd0db Added a note about the rotating_file monolog handler
Thanks Javier! I took some liberty in re-wording the paragraph to be slightly shorter - but please let me know if anyone thinks I've changed any meaning or anything with it - sha: e7c984f Cheers! |