mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 16:15:49 +03:00
[GH-ISSUE #1962] Configuration of "main" log / No rotation #844
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#844
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @micter59 on GitHub (Apr 1, 2025).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1962
PHP 8.2
Symfony 7.2.3
Monolog 3.10.0
Hello, I'm using monolog with Symfony.
I configured the "main" log for rotation, but it seems rotation never happens.
Here's the config I put in monolog.yaml to configure the service :
For security and audit handlers, everything is ok. I've got log files each day, with names like "dev_audit-YYYY-MM-DD.log" or "dev_security-YYYY-MM-DD.log". Same configuration is done for "main" handler, but the logs never rotates. And I saw that the log file is called "dev.log", and not "dev_main.log" as configured.
Do you see anything I missed in the configuration please ?
Thank you.
Michaël
@stof commented on GitHub (Apr 1, 2025):
Do you have other configuration in your project that may be overriding the configuration of your
mainhandler ? That's the only explanation I see for that behavior.@micter59 commented on GitHub (Apr 1, 2025):
I don't know really. For me, the only configuration is in this yaml file, and before the code I mentionned earlier, I've just the declaration of a new channel :
This shouldn't interfere with the main handler, for what I understand.
@micter59 commented on GitHub (Apr 3, 2025):
Sorry this was a silly question. I've just found I have "monolog.yaml" file in "packages/dev", in "packages/prod" and directly in "packages"...
Just a last question about this : what is recommended ?
@Seldaek commented on GitHub (Oct 24, 2025):
IMO all in one monolog.yaml is clearer so you have the overview and are less likely to do such mistakes..
when@dev:syntax lets you split env specific configs in the same file already.