Log the command, not the module
This commit is contained in:
parent
4016a576d5
commit
aacaa3c2cf
2 changed files with 10 additions and 10 deletions
|
@ -576,7 +576,7 @@ class App
|
||||||
$this->profiler->set(microtime(true), 'classinit');
|
$this->profiler->set(microtime(true), 'classinit');
|
||||||
|
|
||||||
$moduleName = $this->args->getModuleName();
|
$moduleName = $this->args->getModuleName();
|
||||||
$page->setLogging($moduleName, $this->args->getMethod());
|
$page->setLogging($this->args->getCommand(), $this->args->getMethod());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Missing DB connection: ERROR
|
// Missing DB connection: ERROR
|
||||||
|
|
|
@ -80,7 +80,7 @@ class Page implements ArrayAccess
|
||||||
private $basePath;
|
private $basePath;
|
||||||
|
|
||||||
private $timestamp = 0;
|
private $timestamp = 0;
|
||||||
private $moduleName = '';
|
private $command = '';
|
||||||
private $method = '';
|
private $method = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -92,16 +92,16 @@ class Page implements ArrayAccess
|
||||||
$this->basePath = $basepath;
|
$this->basePath = $basepath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setLogging(string $moduleName, string $method)
|
public function setLogging(string $command, string $method)
|
||||||
{
|
{
|
||||||
$this->moduleName = $moduleName;
|
$this->command = $command;
|
||||||
$this->method = $method;
|
$this->method = $method;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function logRuntime()
|
public function logRuntime()
|
||||||
{
|
{
|
||||||
$runtime = number_format(microtime(true) - $this->timestamp, 3);
|
$runtime = number_format(microtime(true) - $this->timestamp, 3);
|
||||||
Logger::debug('Runtime', ['method' => $this->method, 'module' => $this->moduleName, 'runtime' => $runtime]);
|
Logger::debug('Runtime', ['method' => $this->method, 'command' => $this->command, 'runtime' => $runtime]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -440,7 +440,7 @@ class Page implements ArrayAccess
|
||||||
{
|
{
|
||||||
$moduleName = $args->getModuleName();
|
$moduleName = $args->getModuleName();
|
||||||
|
|
||||||
$this->moduleName = $moduleName;
|
$this->command = $moduleName;
|
||||||
$this->method = $args->getMethod();
|
$this->method = $args->getMethod();
|
||||||
|
|
||||||
/* Create the page content.
|
/* Create the page content.
|
||||||
|
|
Loading…
Reference in a new issue