From bb14f7e97af3957ae98acea26c4ca9819469301e Mon Sep 17 00:00:00 2001 From: aymm Date: Sat, 27 Mar 2021 17:59:36 +0100 Subject: [PATCH] Fixed log level, made app name public --- src/APnutI.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/APnutI.php b/src/APnutI.php index aec2c78..d16f540 100644 --- a/src/APnutI.php +++ b/src/APnutI.php @@ -34,7 +34,6 @@ class APnutI protected ?string $needed_scope; protected ?string $redirect_target = null; protected array $headers = []; - protected string $app_name = 'Abstract API'; protected ?string $server_token; protected ?string $access_token; protected LoggerInterface $logger; @@ -45,6 +44,7 @@ class APnutI protected ?User $current_user = null; public ?Meta $meta = null; + public string $app_name = 'Abstract API'; /* * Error codes: @@ -83,7 +83,7 @@ class APnutI if (empty($log_level)) { $log_level = Logger::INFO; } 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->token_session_key = $this->app_name.'access_token';