mirror of
https://github.com/fernwerker/ownDynDNS.git
synced 2025-07-09 21:55:13 +02:00
* handle log env settings (dooh)
This commit is contained in:
parent
05e326abe6
commit
b551a25391
2 changed files with 17 additions and 0 deletions
|
@ -30,6 +30,11 @@ final class Config
|
|||
*/
|
||||
private $customerId;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $log = true;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
|
@ -104,6 +109,14 @@ final class Config
|
|||
return $this->customerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isLog()
|
||||
{
|
||||
return $this->log;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
|
|
@ -72,6 +72,10 @@ final class Handler
|
|||
|
||||
private function doExit()
|
||||
{
|
||||
if (!$this->config->isLog()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// save only the newest 100 log entries for each domain
|
||||
$this->log[$this->payload->getDomain()] = array_reverse(array_slice(array_reverse($this->log[$this->payload->getDomain()]), 0, 100));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue