+ public function setLogging(string $method, string $module, string $command)
+ {
+ $this->method = $method;
+ $this->module = $module;
+ $this->command = $command;
+ }
+
+ public function logRuntime(IManageConfigValues $config, string $origin = '')
+ {
+ $ignore = $config->get('system', 'runtime_ignore');
+ if (in_array($this->module, $ignore) || in_array($this->command, $ignore)) {
+ return;
+ }
+
+ $signature = !empty($_SERVER['HTTP_SIGNATURE']);
+ $load = number_format(System::currentLoad(), 2);
+ $runtime = number_format(microtime(true) - $this->timestamp, 3);
+ if ($runtime > $config->get('system', 'runtime_loglimit')) {
+ Logger::debug('Runtime', ['method' => $this->method, 'module' => $this->module, 'runtime' => $runtime, 'load' => $load, 'origin' => $origin, 'signature' => $signature, 'request' => $_SERVER['REQUEST_URI'] ?? '']);
+ }
+ }
+