logfileco /
logfile-php
| 1 | <?php |
||||||
| 2 | |||||||
| 3 | require __DIR__ . '/vendor/autoload.php'; |
||||||
| 4 | |||||||
| 5 | $logfile = new Logfile\Logfile('92193684-b2a9-84ca-cd07-d1631a3813d2'); |
||||||
| 6 | $logfile->setPath(__DIR__); |
||||||
|
0 ignored issues
–
show
|
|||||||
| 7 | $logfile->setUser(['id' => '4']); |
||||||
|
0 ignored issues
–
show
The method
setUser() does not exist on Logfile\Logfile.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||||||
| 8 | $logfile->setTags([ |
||||||
|
0 ignored issues
–
show
The method
setTags() does not exist on Logfile\Logfile.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||||||
| 9 | 'env' => $_SERVER, |
||||||
| 10 | ]); |
||||||
| 11 | $logfile->setRelease(exec('git log --pretty="%H" -n1 HEAD')); |
||||||
|
0 ignored issues
–
show
The method
setRelease() does not exist on Logfile\Logfile.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||||||
| 12 | |||||||
| 13 | $handler = new Logfile\MonologHandler($logfile); |
||||||
| 14 | |||||||
| 15 | $logger = new Monolog\Logger('debug'); |
||||||
| 16 | $logger->pushHandler($handler); |
||||||
| 17 | |||||||
| 18 | // -------- |
||||||
| 19 | |||||||
| 20 | set_exception_handler(function (Throwable $e) use($logfile, $logger) { |
||||||
| 21 | $logfile->captureException($e); |
||||||
| 22 | $logger->error($e->getMessage(), ['exception' => $e]); |
||||||
| 23 | }); |
||||||
| 24 | |||||||
| 25 | function fail() { |
||||||
| 26 | throw new ErrorException('whoops'); |
||||||
| 27 | } |
||||||
| 28 | |||||||
| 29 | fail(); |
||||||
| 30 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.