File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -20,19 +20,17 @@ composer require cesargb/php-log-rotation
2020This is an example:
2121
2222``` php
23- use use Cesargb\Log\Rotation;
23+ use Cesargb\Log\Rotation;
24+ use Cesargb\Log\Processors\GzProcessor;
25+ use Cesargb\Log\Processors\RotativeProcessor;
2426
2527$fileLog='file.log';
2628
2729$rotation = new Rotation();
2830
2931$rotation->addProcessor(new GzProcessor());
30-
31- $rotation->addProcessor(
32- (new RotativeProcessor())->setMaxFiles(7)
33- );
34-
35- $rotation->rotate($fileLog);
32+ ->addProcessor(new RotativeProcessor())
33+ ->rotate($fileLog);
3634```
3735
3836## Processor
@@ -53,9 +51,9 @@ By default is 366 (One year if rotate each day).
5351
5452## Todo
5553
56- * Processor Prefix; To add prefix to file rotated, sample: date (yyyy-mm-dd)
57- * Processor Archive; To move the file rotated to other dir.
58- * Processors to move to the cloud
54+ [ ] Processor Prefix; To add prefix to file rotated, sample: date (yyyy-mm-dd)
55+ [ ] Processor Archive; To move the file rotated to other dir.
56+ [ ] Processors to move to the cloud
5957
6058## Test
6159Run test with:
You can’t perform that action at this time.
0 commit comments