1+ # Rotate Laravel logs files and compress
2+
13![ tests] ( https://github.com/cesargb/laravel-logs-rotate/workflows/tests/badge.svg )
24[ ![ StyleCI] ( https://styleci.io/repos/119604039/shield?branch=master )] ( https://styleci.io/repos/119604039 )
35[ ![ Latest Stable Version] ( https://img.shields.io/packagist/v/cesargb/laravel-logs-rotate.svg )] ( https://packagist.org/packages/cesargb/laravel-logs-rotate )
46[ ![ Scrutinizer Code Quality] ( https://scrutinizer-ci.com/g/cesargb/laravel-logs-rotate/badges/quality-score.png?b=master )] ( https://scrutinizer-ci.com/g/cesargb/laravel-logs-rotate/?branch=master )
57
6- # Rotate Laravel logs files and compress
7-
88This package allows you to rotate the Laravel record file with compression. This method is useful if you use logger channel ` single ` (StreamHandler)
99
1010## Installation
@@ -30,6 +30,7 @@ You can publish config file with:
3030``` bash
3131php artisan vendor:publish --provider=" Cesargb\File\Rotate\RotateServiceProvider" --tag=config
3232```
33+
3334This is the contents of the published config/rotate.php config file:
3435
3536``` php
@@ -46,17 +47,6 @@ return [
4647 */
4748 'log_compress_files' => true,
4849
49- /*
50- |--------------------------------------------------------------------------
51- | Archive Dir
52- |--------------------------------------------------------------------------
53- |
54- | This value determines the folder where the files are saved.
55- | Leave null to archive in the same folder of your logs.
56- |
57- */
58- 'archive_dir' => null,
59-
6050 /*
6151 |--------------------------------------------------------------------------
6252 | Schedule Rotate
@@ -90,12 +80,12 @@ return [
9080 | Array the other foreing files
9181 |
9282 | Example:
93- | 'foreing_files ' => [
83+ | 'foreign_files ' => [
9484 storage_path('/logs/worker.log')
9585 | ]
9686 |
9787 */
98- 'foreing_files ' => []
88+ 'foreign_files ' => []
9989];
10090```
10191
@@ -133,17 +123,6 @@ It has two public properties:
133123* fileSource: the full path of file to rotate
134124* fileRotated: the full path of file rotated
135125
136- ### RotateIsNotNecessary
137-
138- ` Cesargb\File\Rotate\Events\RotateIsNotNecessary `
139-
140- If file log does not exist or is empty this event will be fired.
141-
142- It has two public properties:
143-
144- * fileSource: the full path of file to rotate
145- * message: Descriptive message of the reason
146-
147126### RotateHasFailed
148127
149128` Cesargb\File\Rotate\Handlers\RotativeHandler `
@@ -167,6 +146,10 @@ Run test with:
167146composer test
168147```
169148
149+ ## Upgrading
150+
151+ Please see [ UPGRADING] ( UPGRADING.md ) for details.
152+
170153## Knowledge Issues
171154
172155* [ #8 ] ( https://github.com/cesargb/laravel-logs-rotate/issues/8 ) While the file is being rotated, any record of another process may be lost.
0 commit comments