File tree Expand file tree Collapse file tree 1 file changed +36
-1
lines changed Expand file tree Collapse file tree 1 file changed +36
-1
lines changed Original file line number Diff line number Diff line change 11
22# PHP class to logs rotation
3- PHP Class to Rotate files with compression
3+ PHP Class to rotate log files
4+
5+ This class permit log rotating with diferetne processor.
46
57## Usage
68
@@ -21,3 +23,36 @@ $rotation->addProcessor(
2123
2224$rotation->rotate($fileLog);
2325```
26+
27+ ## Processor
28+
29+ After of move the content of current log file, you can process changes in
30+ the file was rotated.
31+
32+ ### GzProcessor
33+
34+ This processor permit compress in gz format the file rotated.
35+
36+ ### RotativeProcessor
37+
38+ This processor permit rotative each file in format file.log.1, file.log.2, ...
39+
40+ You can call method ` setMaxFiles ` to set the number max of the files rotated.
41+ By default is 366 (One year if rotate each day).
42+
43+ ## Todo
44+
45+ * Processor Prefix; To add prefix to file rotated, sample: date (yyyy-mm-dd)
46+ * Processor Archive; To move the file rotated to other dir.
47+ * Processors to move to the cloud
48+
49+ ## Test
50+ Run test with:
51+
52+ ``` bash
53+ composer test
54+ ```
55+
56+ ## Contributing
57+
58+ Any contributions are welcome.
You can’t perform that action at this time.
0 commit comments