File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,17 @@ public function getProcessors()
1414 return $ this ->processors ;
1515 }
1616
17- public function addProcessor (AbstractProcessor $ processor )
17+ /**
18+ * Add processors to rotate
19+ *
20+ * @param AbstractProcessor ...$processors
21+ * @return self
22+ */
23+ public function addProcessor (AbstractProcessor ...$ processors ): self
1824 {
19- $ this ->processors [] = $ processor ;
25+ $ this ->processors = array_merge ($ this ->processors , $ processors );
26+
27+ return $ this ;
2028 }
2129
2230 /**
Original file line number Diff line number Diff line change @@ -40,9 +40,8 @@ public function test_rotation_processor_with_gz_processor()
4040
4141 $ rotation = new Rotation ();
4242
43- $ rotation ->addProcessor (new GzProcessor ());
44-
4543 $ rotation ->addProcessor (
44+ new GzProcessor (),
4645 (new RotativeProcessor ())
4746 ->setMaxFiles ($ maxFiles )
4847 ->setFileOriginal (self ::DIR_WORK .'file.log ' )
You can’t perform that action at this time.
0 commit comments