File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
- <?php
1
+ <?php declare (strict_types= 1 );
2
2
3
3
require_once dirname (__DIR__ ) . '/vendor ' . '/autoload.php ' ;
4
4
8
8
use Bartlett \Monolog \Handler \GrowlHandler ;
9
9
use Bartlett \Monolog \Handler \CallbackFilterHandler ;
10
10
11
+ use PHPUnit \Runner \Version ;
12
+
11
13
class YourMonolog extends Logger
12
14
{
13
15
public function __construct ($ name = 'PHPUnit ' , $ level = 'debug ' )
@@ -27,7 +29,7 @@ function($record, $handlerLevel) {
27
29
);
28
30
29
31
$ stream = new RotatingFileHandler (
30
- __DIR__ . DIRECTORY_SEPARATOR . 'monologTestListener.log ' ,
32
+ __DIR__ . DIRECTORY_SEPARATOR . 'monologTestListener-phpunit- ' . Version:: series () . ' .log ' ,
31
33
0 , // maximal amount of files to keep (0 means unlimited)
32
34
Logger::toMonologLevel ($ level )
33
35
);
@@ -42,7 +44,7 @@ function($record, $handlerLevel) {
42
44
43
45
$ handlers [] = new CallbackFilterHandler ($ growl , $ filters );
44
46
45
- } catch (\ Exception $ e ) {
47
+ } catch (Exception $ e ) {
46
48
// Growl server is probably not started
47
49
echo $ e ->getMessage (), PHP_EOL , PHP_EOL ;
48
50
}
You can’t perform that action at this time.
0 commit comments