File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ composer require cesargb/php-log-rotation
2323
2424``` php
2525use Cesargb\Log\Rotation;
26+ use Cesargb\Log\Exceptions\RotationFailed;
2627
2728$rotation = new Rotation();
2829
@@ -31,7 +32,7 @@ $rotation
3132 ->files(30) // Optional, files are rotated 30 times before being removed. Default 366
3233 ->minSize(1024) // Optional, are rotated when they grow bigger than 1024 bytes. Default 0
3334 ->then(function ($filenameTarget, $filenameRotated) {}) // Optional, to get filename target and original filename
34- ->catch(function ($exception) {}) // Optional, to catch a exception in rotating
35+ ->catch(function (RotationFailed $exception) {}) // Optional, to catch a exception in rotating
3536 ->rotate('file.log');
3637```
3738
You can’t perform that action at this time.
0 commit comments