aboutsummaryrefslogtreecommitdiffhomepage
path: root/Digitigrade/GlobalConfig.php
diff options
context:
space:
mode:
Diffstat (limited to 'Digitigrade/GlobalConfig.php')
-rw-r--r--Digitigrade/GlobalConfig.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/Digitigrade/GlobalConfig.php b/Digitigrade/GlobalConfig.php
index 7fbfab3..63a1031 100644
--- a/Digitigrade/GlobalConfig.php
+++ b/Digitigrade/GlobalConfig.php
@@ -28,6 +28,16 @@ class GlobalConfig extends Singleton {
return $this->confData['debug']['send_tracebacks'] ?? false;
}
+ public function getLogLevel(): int {
+ return match ($this->confData['debug']['log_level']) {
+ 'debug' => Logger::LEVEL_DEBUG,
+ 'info' => Logger::LEVEL_INFO,
+ 'warning' => Logger::LEVEL_WARNING,
+ 'error' => Logger::LEVEL_ERROR,
+ default => Logger::LEVEL_INFO
+ };
+ }
+
public function getDbConnection(): string {
return 'pgsql:host=' . $this->confData['database']['host'] .
';port=' . $this->confData['database']['port'] .