]> git.mxchange.org Git - friendica.git/blobdiff - src/App/Page.php
Merge pull request #11544 from annando/image-proxy
[friendica.git] / src / App / Page.php
index 305b2962b9c70e856ba31c67ab28394e82d1c457..c78d0f9e0c53b5f95a4a34774b62bfdfcf9f52a0 100644 (file)
@@ -98,10 +98,16 @@ class Page implements ArrayAccess
                $this->method  = $method;
        }
 
-       public function logRuntime()
+       public function logRuntime(IManageConfigValues $config)
        {
+               if (in_array($this->command, $config->get('system', 'runtime_ignore'))) {
+                       return;
+               }
+
                $runtime = number_format(microtime(true) - $this->timestamp, 3);
-               Logger::debug('Runtime', ['method' => $this->method, 'command' => $this->command, 'runtime' => $runtime]);
+               if ($runtime > $config->get('system', 'runtime_loglimit')) {
+                       Logger::debug('Runtime', ['method' => $this->method, 'command' => $this->command, 'runtime' => $runtime]);
+               }
        }
 
        /**