Fixed log level, made app name public
This commit is contained in:
parent
cafb7ad654
commit
bb14f7e97a
@ -34,7 +34,6 @@ class APnutI
|
|||||||
protected ?string $needed_scope;
|
protected ?string $needed_scope;
|
||||||
protected ?string $redirect_target = null;
|
protected ?string $redirect_target = null;
|
||||||
protected array $headers = [];
|
protected array $headers = [];
|
||||||
protected string $app_name = 'Abstract API';
|
|
||||||
protected ?string $server_token;
|
protected ?string $server_token;
|
||||||
protected ?string $access_token;
|
protected ?string $access_token;
|
||||||
protected LoggerInterface $logger;
|
protected LoggerInterface $logger;
|
||||||
@ -45,6 +44,7 @@ class APnutI
|
|||||||
protected ?User $current_user = null;
|
protected ?User $current_user = null;
|
||||||
|
|
||||||
public ?Meta $meta = null;
|
public ?Meta $meta = null;
|
||||||
|
public string $app_name = 'Abstract API';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Error codes:
|
* Error codes:
|
||||||
@ -83,7 +83,7 @@ class APnutI
|
|||||||
if (empty($log_level)) {
|
if (empty($log_level)) {
|
||||||
$log_level = Logger::INFO;
|
$log_level = Logger::INFO;
|
||||||
} elseif (is_string($log_level)) {
|
} elseif (is_string($log_level)) {
|
||||||
$log_level = constant('Logger::'.$log_level);
|
$log_level = constant('Monolog\Logger::'.$log_level);
|
||||||
}
|
}
|
||||||
$this->logger = empty($log_path) ? new NullLogger() : new Logger($this->app_name);
|
$this->logger = empty($log_path) ? new NullLogger() : new Logger($this->app_name);
|
||||||
$this->token_session_key = $this->app_name.'access_token';
|
$this->token_session_key = $this->app_name.'access_token';
|
||||||
|
Loading…
Reference in New Issue
Block a user