Skip to content

Commit c1c0c47

Browse files
committed
update docs
1 parent 065487f commit c1c0c47

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,19 @@ This is an example:
2222
```php
2323
use Cesargb\Log\Rotation;
2424

25-
$fileLog='file.log';
26-
2725
$rotation = new Rotation();
2826

29-
$rotation
30-
->compress()
31-
->files(30)
32-
->minSize(1)
33-
->rotate($fileLog);
27+
// Rotate a file
28+
$rotation->rotate('file.log');
29+
30+
// Log files are rotated 10 times before being removed, 366 default
31+
$rotation->files(30)->rotate('file.log');
32+
33+
// Compress file rotated
34+
$rotation->compress()->rotate('file.log');
35+
36+
// Log files are rotated only if they grow bigger then 1024 bytes
37+
$rotation->minSize(1024)->rotate('file.log');
3438
```
3539

3640
## Test

0 commit comments

Comments
 (0)