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()
14
14
return $ this ->processors ;
15
15
}
16
16
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
18
24
{
19
- $ this ->processors [] = $ processor ;
25
+ $ this ->processors = array_merge ($ this ->processors , $ processors );
26
+
27
+ return $ this ;
20
28
}
21
29
22
30
/**
Original file line number Diff line number Diff line change @@ -40,9 +40,8 @@ public function test_rotation_processor_with_gz_processor()
40
40
41
41
$ rotation = new Rotation ();
42
42
43
- $ rotation ->addProcessor (new GzProcessor ());
44
-
45
43
$ rotation ->addProcessor (
44
+ new GzProcessor (),
46
45
(new RotativeProcessor ())
47
46
->setMaxFiles ($ maxFiles )
48
47
->setFileOriginal (self ::DIR_WORK .'file.log ' )
You can’t perform that action at this time.
0 commit comments