mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-07 15:54:26 +02:00
Configuration for logging added
This commit is contained in:
parent
2e6e3597e5
commit
4622814e5f
4 changed files with 18 additions and 4 deletions
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue