Issues (10)

examples/log_test.php (1 issue)

Labels
Severity
1
<?php
2
define("NO_KEEP_STATISTIC", "Y");
3
define("NO_AGENT_STATISTIC","Y");
4
require_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php');
5
6
$log = new \App\Log('test');
7
8
9
$log->info('log info message');
10
$log->debug($_SERVER);
11
$log->alert([1, 2]);
12
$log->notice(\Bitrix\Main\Application::getConnection());
0 ignored issues
show
The type Bitrix\Main\Application was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
14
try {
15
    throw new Exception('test exception');
16
} catch(Exception $e) {
17
    $log->error($e);
18
}
19
throw new Exception('test exception');
20
21
22