Skip to content

Conversation

@baks-dev
Copy link

@baks-dev baks-dev commented Oct 26, 2025

Hello,

I suggest rotating log files hourly. Large logs are often difficult to load into the IDE, view and analyze. At the user's discretion, it would be useful to separate by specifying a format like 'Y-m-d-H' in the settings. I will give an example of a php configuration:

    $config
        ->handler('request')
        ->formatter('monolog.formatter.standard')
        ->type('rotating_file')
        ->maxFiles(168)
        ->dateFormat('Y-m-d-H')
        ->filenameFormat('{filename}-{date}')
        ->path('%kernel.logs_dir%/request-%kernel.environment%.log')
        ->level('debug')
        ->channels()
        ->elements(['request']);

Rotating log files hourly. Large logs are often difficult to load into the IDE, view and analyze. At the user's discretion, it would be useful to separate by specifying a format like 'Y-m-d-H' in the settings.
['Y', 'y', 'm', 'd'],
['[0-9][0-9][0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]'],
['Y', 'y', 'm', 'd', 'H'],
['[0-9][0-9][0-9][0-9][0-9]', '[0-9][0-9][0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]'],
Copy link
Owner

Choose a reason for hiding this comment

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

This looks borked.. It should just add , '[0-9][0-9]' at the end of the line I think?

Copy link
Author

Choose a reason for hiding this comment

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

Really stupid mistake ))

@Seldaek Seldaek added this to the 3.x milestone Nov 4, 2025
@Seldaek Seldaek removed the Needs Work label Nov 5, 2025
@Seldaek
Copy link
Owner

Seldaek commented Nov 5, 2025

Tests are failing can you please check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants