]> git.mxchange.org Git - friendica.git/commitdiff
Log the command, not the module
authorMichael <heluecht@pirati.ca>
Tue, 17 May 2022 21:25:01 +0000 (21:25 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 17 May 2022 21:25:01 +0000 (21:25 +0000)
src/App.php
src/App/Page.php

index bf5c309ed39910dacf45654aba2163d0a18efce3..d85de3670975c1990c9beefe3090368a78f42c35 100644 (file)
@@ -576,7 +576,7 @@ class App
                $this->profiler->set(microtime(true), 'classinit');
 
                $moduleName = $this->args->getModuleName();
-               $page->setLogging($moduleName, $this->args->getMethod());
+               $page->setLogging($this->args->getCommand(), $this->args->getMethod());
 
                try {
                        // Missing DB connection: ERROR
index 8986d4aa91c11c6c7668998c4d88e03702966ddb..16c4934e315e4f1a229385bf3dfbf8fd18dbd9c3 100644 (file)
@@ -79,9 +79,9 @@ class Page implements ArrayAccess
         */
        private $basePath;
 
-       private $timestamp  = 0;
-       private $moduleName = '';
-       private $method     = '';
+       private $timestamp = 0;
+       private $command   = '';
+       private $method    = '';
 
        /**
         * @param string $basepath The Page basepath
@@ -92,16 +92,16 @@ class Page implements ArrayAccess
                $this->basePath = $basepath;
        }
 
-       public function setLogging(string $moduleName, string $method)
+       public function setLogging(string $command, string $method)
        {
-               $this->moduleName = $moduleName;
-               $this->method     = $method;
+               $this->command = $command;
+               $this->method  = $method;
        }
 
        public function logRuntime()
        {
                $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,8 +440,8 @@ class Page implements ArrayAccess
        {
                $moduleName = $args->getModuleName();
 
-               $this->moduleName = $moduleName;
-               $this->method     = $args->getMethod();
+               $this->command = $moduleName;
+               $this->method  = $args->getMethod();
 
                /* Create the page content.
                 * Calls all hooks which are including content operations