Skip to content
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

Johnpipi maxfilesize #2

Merged
merged 3 commits into from
Mar 7, 2021
Merged

Conversation

johnpipi
Copy link
Contributor

added maxFileSize. It will check if the filesize is less than maxFileSize ( in MB ) then skip the rotation.

added maxFileSize.  It will check if the filesize is less than maxFileSize then skip the rotation
updated docs for maxFileSize
accept maxFileSize in MB then convert to bytes for the filesize function
@cesargb
Copy link
Owner

cesargb commented Jan 26, 2021

Hi @johnpipi , thanks for your PR, this is a good feature.

I wonder if it would be more convenient to move this argument, which is optional, to a setterfunction?

The Api could be something like this:

$rotation->addProcessor(new GzProcessor());
    ->addProcessor(new RotativeProcessor())
    ->size(100)
    ->rotate($fileLog);

In this case, the function that determine this functionality be size, I have taken this name from logrotate: https://linux.die.net/man/8/logrotate

What do you think?

Could you submit these changes?

@cesargb cesargb changed the base branch from master to v2 March 7, 2021 08:15
@cesargb cesargb merged commit deba2a8 into cesargb:v2 Mar 7, 2021
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.

None yet

2 participants