/** * {@inheritDoc} */ protected function write(array $record) { // Accumulate records self::$records[] = $record; // Register shutdown handler if not already done if (!self::$initialized) { self::$initialized = true; $this->registerShutdownFunction(); } }
/** * {@inheritDoc} */ protected function write(array $record) { // Accumulate records self::$records[] = $record; // Register shutdown handler if not already done if (PHP_SAPI !== 'cli' && !self::$initialized) { self::$initialized = true; register_shutdown_function(array('Monolog\\Handler\\BrowserConsoleHandler', 'send')); } }