]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/output/debug/console/class_DebugConsoleOutput.php
Continued:
[core.git] / framework / main / classes / output / debug / console / class_DebugConsoleOutput.php
index 80915da609e0e012dfa4bbf2048d2796bbc7159c..804119a5aaba9abcf57885c985194a6fe1273f98 100644 (file)
@@ -33,14 +33,22 @@ use Org\Mxchange\CoreFramework\Stream\Output\OutputStreamer;
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class DebugConsoleOutput extends BaseDebugOutput implements Debugger, OutputStreamer, Registerable {
+       /**
+        * Cached configuration entry 'debug_*_output_timings'
+        */
+       private $debugOutputTimings = 'N';
+
        /**
         * Protected constructor
         *
         * @return      void
         */
        private function __construct () {
-               // Call parent constructor
+               // Call parent constructor first
                parent::__construct(__CLASS__);
+
+               // Cache configuration entry
+               $this->debugOutputTimings = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('debug_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_output_timings');
        }
 
        /**
@@ -71,7 +79,7 @@ class DebugConsoleOutput extends BaseDebugOutput implements Debugger, OutputStre
                }
 
                // Are debug times enabled?
-               if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('debug_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_output_timings') == 'Y') {
+               if ($this->debugOutputTimings == 'Y') {
                        // Output it first
                        $output = $this->getPrintableExecutionTime() . $output;
                }