zDebug.
@param array $info
@param string $data
@param string $resposta
498650
private function zDebug($info = [], $data = '', $resposta = '')
    {
        $this->infoCurl['url'] = $info['url'];
        $this->infoCurl['content_type'] = $info['content_type'];
        $this->infoCurl['http_code'] = $info['http_code'];
        $this->infoCurl['header_size'] = $info['header_size'];
        $this->infoCurl['request_size'] = $info['request_size'];
        $this->infoCurl['filetime'] = $info['filetime'];
        $this->infoCurl['ssl_verify_result'] = $info['ssl_verify_result'];
        $this->infoCurl['redirect_count'] = $info['redirect_count'];
        $this->infoCurl['total_time'] = $info['total_time'];
        $this->infoCurl['namelookup_time'] = $info['namelookup_time'];
        $this->infoCurl['connect_time'] = $info['connect_time'];
        $this->infoCurl['pretransfer_time'] = $info['pretransfer_time'];
        $this->infoCurl['size_upload'] = $info['size_upload'];
        $this->infoCurl['size_download'] = $info['size_download'];
        $this->infoCurl['speed_download'] = $info['speed_download'];
        $this->infoCurl['speed_upload'] = $info['speed_upload'];
        $this->infoCurl['download_content_length'] = $info['download_content_length'];
        $this->infoCurl['upload_content_length'] = $info['upload_content_length'];
        $this->infoCurl['starttransfer_time'] = $info['starttransfer_time'];
        $this->infoCurl['redirect_time'] = $info['redirect_time'];
        //coloca as informações em uma variável
        $txtInfo = '';
        foreach ($info as $key => $content) {
            if (is_string($content)) {
                $txtInfo .= strtoupper($key) . '=' . $content . "\n";
            }
        }
        //carrega a variavel debug
        $this->soapDebug = $data . "\n\n" . $txtInfo . "\n" . $resposta;
    }
1062969
public static function output($data, array $options = [])
    {
        $options = array_merge([
            'trace_offset' => 0,
        ], $options);

        if (!self::$output || !is_string($data)) {
            return;
        }

        if (php_sapi_name() == 'cli') {
            echo str_pad(' DEBUG ', 100, '-', STR_PAD_BOTH);
            echo "\n";
            if (self::$showCalledFrom) {
                echo self::getCalledFrom($options['trace_offset'] + 2);
                echo "\n";
            }
            echo $data;
            echo "\n";
        } else {
            if (self::$showCalledFrom) {
                echo sprintf(self::$style['called_from_format'], self::getCalledFrom($options['trace_offset'] + 2));
            }
            echo sprintf(self::$style['output_format'], $data);
        }
    }
1107376
private function receive_debug_log() {
	// handle error report
	if (isset($_POST['description']) && isset($_POST['log'])) {
		$msg = $_POST['log'];
		mail($this->classparams['errormail'], $_POST['description'], $msg);
	} else {
		if (isset($_SERVER['SERVER_ADMIN']))
		mail($_SERVER['SERVER_ADMIN'], 'Empty jupload error log',
                    'An empty log has just been posted.');
		$this->logPHPDebug('receive_debug_log', 'Empty error log received');
	}
	exit;
}
430223
private function initDebug()
    {
        if (!$this->getVar('debug_level') && !isset($_REQUEST['debug_level'])) return;

		$this->debugMode = $this->getVar('debug_level') | $_REQUEST['debug_level'];
		
        $this->_debug_writer = new \Zend_Log_Writer_Firebug();
        $this->_debugger_request  = new \Zend_Controller_Request_Http();
        $this->_debugger_response = new \Zend_Controller_Response_Http();
        $this->_debugger_channel  = \Zend_Wildfire_Channel_HttpHeaders::getInstance();
        $this->_debugger_channel->setRequest($this->_debugger_request);
        $this->_debugger_channel->setResponse($this->_debugger_response);
        $this->_debugger = new \Zend_Log($this->_debug_writer);
        $this->_debugger->addPriority('SQL', DEBUG_SQL);
        $this->_debugger->addPriority('CACHE', DEBUG_CACHE);
        $this->_debugger->addPriority('BANNER', DEBUG_BANNER);
        
        ob_start();
		
		ini_set('display_errors', 1);
    }
173433
def set_debug(self, status):
        """"""
        if status:
            self.logger.setLevel('DEBUG')
        else:
            self.logger.setLevel('INFO')
548035
public function log($data, $level = self::LEVEL_INFO, $type = null)
    {
        if (!is_string($data)) {
            $data = print_r($data, true);
        }

        file_put_contents(
            $this->getLogDirectory() . '/' . $this->getLogFilename(),
            $this->getLogMessage($data, $level, $type),
            FILE_APPEND
        );
    }
251919
public final void infoDebug(final Throwable cause, final String message)
    {
        logDebug(Level.INFO, cause, message);
    }
163807
public function writeDebugLog( $val ) {
		if ( $this->debugMode === false ) {
			return;
		}

		$this->runlog .= $this->getLogSection() . '> '
			. $val
			. "\n";
	}
550012
private function SetDebugDump($offset = null)
    {
        if (!$this->query_result or !$this->debug_on) {
            return;
        }

        $report = '<b>DATA:</b><br />
        <table border="0" cellpadding="5" cellspacing="1" style="background-color:#555555">
        <tr style="background-color:#eeeeee"><td nowrap valign="bottom"><font color="555599" size="2"><b>(row)</b></font></td>';

        if (is_numeric($offset)) {
            $z = 2;
            $report.= '<td nowrap align="left" valign="top"><font size="1" color="555599">'.$this->col_info[$offset]->type.' '.$this->col_info[$offset]->size.'</font><br><font size=2><b>'.$this->col_info[$offset]->name.'</b></font></td>';
        } else {
            $z = count($this->col_info);
            for ($i=0; $i < $z; $i++) {
                $report.= '<td nowrap align="left" valign="top"><font size="1" color="555599">'.$this->col_info[$i]->type.' '.$this->col_info[$i]->size.'</font><br><font size=2><b>'.$this->col_info[$i]->name.'</b></font></td>';
            }
        }

        $report .= "</tr>";

        if (is_array($this->result) and count($this->result) > 0) {
            $i=0;
            foreach ($this->result as $one_row) {
                $i++;
                $report.= '<tr bgcolor="ffffff"><td style="background-color:#eeeeee" nowrap align="middle"><font size="2" color="555599">'.$i.'</font></td>';

                if (is_array($one_row)) {
                    foreach ($one_row as $item) {
                        $report.= '<td nowrap style="background-color:#ffffff"><font size="2">'.htmlspecialchars($item).'</font></td>';
                    }
                } else {
                    $report.= '<td nowrap style="background-color:#ffffff"><font size="2">'.htmlspecialchars($one_row).'</font></td>';
                }


                $report.= "</tr>";
            }
        } else {
            $report.= '<tr bgcolor="ffffff"><td colspan="'.($z+1).'"><font size=2>No Results</font></td></tr>';
        }

        $report.= "</table>";
        $this->printOutStr .= $report;
    }
1267435
public static function debug($engine, $data, $result = null)
    {
        static $debug_counter;

        $line = '[' . (++$debug_counter[$engine]) . '] ' . $data;

        if (($len = strlen($line)) > self::DEBUG_LINE_LENGTH) {
            $diff = $len - self::DEBUG_LINE_LENGTH;
            $line = substr($line, 0, self::DEBUG_LINE_LENGTH) . "... [truncated $diff bytes]";
        }

        if ($result !== null) {
            $line .= ' [' . ($result ? 'TRUE' : 'FALSE') . ']';
        }

        self::write_log($engine, $line);
    }
1289257
public function info($point, $info = '', $type = self::TYPE_MSG)
    {
        self::$enable AND self::$info[$type][$point] = self::point($info, $point);
    }
167569
function dynamic_init( array $plugin_info ) {
            $this->_logger->entrance();

            $this->parse_settings( $plugin_info );

            if ( is_admin() && $this->is_theme() && $this->is_premium() && ! $this->has_active_valid_license() ) {
                $this->add_ajax_action(
                    'delete_theme_update_data',
                    array( &$this, '_delete_theme_update_data_action' )
                );
            }

            if ( ! self::is_ajax() ) {
                if ( ! $this->is_addon() || $this->is_only_premium() ) {
                    add_action(
                        ( $this->_is_network_active && fs_is_network_admin() ? 'network_' : '' ) . 'admin_menu',
                        array( &$this, '_prepare_admin_menu' ),
                        WP_FS__LOWEST_PRIORITY
                    );
                }
            }

            if ( $this->should_stop_execution() ) {
                return;
            }

            if ( ! $this->is_registered() ) {
                if ( $this->is_anonymous() ) {
                    // If user skipped, no need to test connectivity.
                    $this->_has_api_connection = true;
                    $this->_is_on              = true;
                } else {
                    if ( ! $this->has_api_connectivity() ) {
                        if ( $this->_admin_notices->has_sticky( 'failed_connect_api_first' ) ||
                             $this->_admin_notices->has_sticky( 'failed_connect_api' )
                        ) {
                            if ( ! $this->_enable_anonymous || $this->is_premium() ) {
                                // If anonymous mode is disabled, add firewall admin-notice message.
                                add_action( 'admin_footer', array( 'Freemius', '_add_firewall_issues_javascript' ) );

                                $ajax_action_suffix = $this->_slug . ( $this->is_theme() ? ':theme' : '' );
                                add_action( "wp_ajax_fs_resolve_firewall_issues_{$ajax_action_suffix}", array(
                                    &$this,
                                    '_email_about_firewall_issue'
                                ) );

                                add_action( "wp_ajax_fs_retry_connectivity_test_{$ajax_action_suffix}", array(
                                    &$this,
                                    '_retry_connectivity_test'
                                ) );

                                /**
                                 * Currently the admin notice manager relies on the module's type and slug. The new AJAX actions manager uses module IDs, hence, consider to replace the if block above with the commented code below after adjusting the admin notices manager to work with module IDs.
                                 *
                                 * @author Vova Feldman (@svovaf)
                                 * @since  2.0.0
                                 */
                                /*$this->add_ajax_action( 'resolve_firewall_issues', array(
                                    &$this,
                                    '_email_about_firewall_issue'
                                ) );

                                $this->add_ajax_action( 'retry_connectivity_test', array(
                                    &$this,
                                    '_retry_connectivity_test'
                                ) );*/
                            }
                        }

                        return;
                    } else {
                        $this->_admin_notices->remove_sticky( array(
                            'failed_connect_api_first',
                            'failed_connect_api',
                        ) );

                        if ( $this->_anonymous_mode ) {
                            // Simulate anonymous mode.
                            $this->_is_anonymous = true;
                        }
                    }
                }
            }

            /**
             * This should be executed even if Freemius is off for the core module,
             * otherwise, the add-ons dialogbox won't work properly. This is esepcially
             * relevant when the developer decided to turn FS off for existing users.
             *
             * @author Vova Feldman (@svovaf)
             */
            if ( $this->is_user_in_admin() &&
                'plugin-information' === fs_request_get( 'tab', false ) &&
                 $this->should_use_freemius_updater_and_dialog() &&
                 (
                     ( $this->is_addon() && $this->get_slug() == fs_request_get( 'plugin', false ) ) ||
                     ( $this->has_addons() && $this->get_id() == fs_request_get( 'parent_plugin_id', false ) )
                 )
            ) {
                require_once WP_FS__DIR_INCLUDES . '/fs-plugin-info-dialog.php';

                new FS_Plugin_Info_Dialog( $this->is_addon() ? $this->get_parent_instance() : $this );
            }

            // Check if Freemius is on for the current plugin.
            // This MUST be executed after all the plugin variables has been loaded.
            if ( ! $this->is_registered() && ! $this->is_on() ) {
                return;
            }

            if ( $this->has_api_connectivity() ) {
                if ( self::is_cron() ) {
                    $this->hook_callback_to_sync_cron();
                } else if ( $this->is_user_in_admin() ) {
                    /**
                     * Schedule daily data sync cron if:
                     *
                     *  1. User opted-in (for tracking).
                     *  2. If skipped, but later upgraded (opted-in via upgrade).
                     *
                     * @author Vova Feldman (@svovaf)
                     * @since  1.1.7.3
                     *
                     */
                    if ( $this->is_registered() ) {
                        if ( ! $this->is_sync_cron_on() && $this->is_tracking_allowed() ) {
                            $this->schedule_sync_cron();
                        }
                    }

                    /**
                     * Check if requested for manual blocking background sync.
                     */
                    if ( fs_request_has( 'background_sync' ) ) {
                        $this->run_manual_sync();
                    }
                }
            }

            if ( $this->is_registered() ) {
                $this->hook_callback_to_install_sync();
            }

            if ( $this->is_addon() ) {
                if ( $this->is_parent_plugin_installed() ) {
                    // Link to parent FS.
                    $this->_parent = self::get_instance_by_id( $this->_plugin->parent_plugin_id );

                    // Get parent plugin reference.
                    $this->_parent_plugin = $this->_parent->get_plugin();
                }
            }

            if ( $this->is_user_in_admin() ) {
                if ( $this->is_addon() ) {
                    if ( ! $this->is_parent_plugin_installed() ) {
                        $parent_name = $this->get_option( $plugin_info, 'parent_name', null );

                        if ( isset( $plugin_info['parent'] ) ) {
                            $parent_name = $this->get_option( $plugin_info['parent'], 'name', null );
                        }

                        $this->_admin_notices->add(
                            ( ! empty( $parent_name ) ?
                                sprintf( $this->get_text_x_inline( '%s cannot run without %s.', 'addonX cannot run without pluginY', 'addon-x-cannot-run-without-y' ), $this->get_plugin_name(), $parent_name ) :
                                sprintf( $this->get_text_x_inline( '%s cannot run without the plugin.', 'addonX cannot run...', 'addon-x-cannot-run-without-parent' ), $this->get_plugin_name() )
                            ),
                            $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
                            'error'
                        );

                        return;
                    } else {
                        if ( $this->_parent->is_registered() && ! $this->is_registered() ) {
                            // If parent plugin activated, automatically install add-on for the user.
                            $this->_activate_addon_account( $this->_parent );
                        } else if ( ! $this->_parent->is_registered() && $this->is_registered() ) {
                            // If add-on activated and parent not, automatically install parent for the user.
                            $this->activate_parent_account( $this->_parent );
                        }

                        // @todo This should be only executed on activation. It should be migrated to register_activation_hook() together with other activation related logic.
                        if ( $this->is_premium() ) {
                            // Remove add-on download admin-notice.
                            $this->_parent->_admin_notices->remove_sticky( array(
                                'addon_plan_upgraded_' . $this->_slug,
                                'no_addon_license_' . $this->_slug,
                            ) );
                        }

//						$this->deactivate_premium_only_addon_without_license();
                    }
                }

                add_action( 'admin_init', array( &$this, '_admin_init_action' ) );

//				if ( $this->is_registered() ||
//				     $this->is_anonymous() ||
//				     $this->is_pending_activation()
//				) {
//					$this->_init_admin();
//				}
            }

            /**
             * Should be called outside `$this->is_user_in_admin()` scope
             * because the updater has some logic that needs to be executed
             * during AJAX calls.
             *
             * Currently we need to hook to the `http_request_host_is_external` filter.
             * In the future, there might be additional logic added.
             *
             * @author Vova Feldman
             * @since  1.2.1.6
             */
            if (
                $this->should_use_freemius_updater_and_dialog() &&
                (
                    $this->is_premium() ||
                    /**
                     * If not premium but the premium version is installed, also instantiate the updater so that the
                     * plugin information dialog of the premium version will have the information from the server.
                     *
                     * @author Leo Fajardo (@leorw)
                     * @since 2.2.3
                     */
                    ( file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $this->premium_plugin_basename() ) ) )
                ) &&
                $this->has_release_on_freemius()
            ) {
                FS_Plugin_Updater::instance( $this );
            }

            $this->do_action( 'initiated' );

            if ( $this->_storage->prev_is_premium !== $this->_plugin->is_premium ) {
                if ( isset( $this->_storage->prev_is_premium ) ) {
                    $this->apply_filters(
                        'after_code_type_change',
                        // New code type.
                        $this->_plugin->is_premium
                    );
                } else {
                    // Set for code type for the first time.
                    $this->_storage->prev_is_premium = $this->_plugin->is_premium;
                }
            }

            if ( ! $this->is_addon() ) {
                if ( $this->is_registered() ) {
                    // Fix for upgrade from versions < 1.0.9.
                    if ( ! isset( $this->_storage->activation_timestamp ) ) {
                        $this->_storage->activation_timestamp = WP_FS__SCRIPT_START_TIME;
                    }

                    $this->do_action( 'after_init_plugin_registered' );
                } else if ( $this->is_anonymous() ) {
                    $this->do_action( 'after_init_plugin_anonymous' );
                } else if ( $this->is_pending_activation() ) {
                    $this->do_action( 'after_init_plugin_pending_activations' );
                }
            } else {
                if ( $this->is_registered() ) {
                    $this->do_action( 'after_init_addon_registered' );
                } else if ( $this->is_anonymous() ) {
                    $this->do_action( 'after_init_addon_anonymous' );
                } else if ( $this->is_pending_activation() ) {
                    $this->do_action( 'after_init_addon_pending_activations' );
                }
            }
        }
337787
public function debug($message, $data = null)
    {
        if (config('eyewitness.debug', false)) {
            Log::debug('Eyewitness: '.$message, ['data' => $data]);
        }
    }
769240
public static function show(array $data, string $title = '', array $opts = []): void
    {
        if (!$data) {
            return;
        }

        $string = $title ? ColorTag::wrap(\ucfirst($title), 'comment') . ":\n" : '';
        $opts   = \array_merge([
            'char'       => '.',
            'indent'     => '  ',
            'padding'    => 10,
            'valueStyle' => 'info',
        ], $opts);

        $keyMaxLen  = Helper::getKeyMaxWidth($data);
        $paddingLen = $keyMaxLen > $opts['padding'] ? $keyMaxLen : $opts['padding'];

        foreach ($data as $label => $value) {
            $value  = ColorTag::wrap((string)$value, $opts['valueStyle']);
            $string .= $opts['indent'] . \str_pad($label, $paddingLen, $opts['char']) . " $value\n";
        }

        Console::write(\trim($string));
    }
578550
protected function finalRender( $debug_data )
	{
		parent::finalRender( $debug_data );

		$url = \Sifo\Urls::getInstance()->getUrlConfig();
		echo '[INFO] Script debug properly saved. You can check it out at: ' . $url['sifo_debug_analyzer'] . '?execution_key=' . \Sifo\Debug::getExecutionKey() . PHP_EOL;
	}
1014271
private static function getDebugInformationArray($data, array $options = [])
    {
        $options = array_merge([
            'depth'  => 25,
            'indent' => 0,
        ], $options);

        $debugInfo = "[";

        $break = $end = null;
        if (!empty($data)) {
            $break = "\n" . str_repeat("\t", $options['indent']);
            $end   = "\n" . str_repeat("\t", $options['indent'] - 1);
        }

        $datas = [];
        if ($options['depth'] >= 0) {
            foreach ($data as $key => $val) {
                // Sniff for globals as !== explodes in < 5.4
                if ($key === 'GLOBALS' && is_array($val) && isset($val['GLOBALS'])) {
                    $val = '[recursion]';
                } elseif ($val !== $data) {
                    $val = static::getDebugInformation($val, $options);
                }
                $datas[] = $break . static::getDebugInformation($key) . ' => ' . $val;
            }
        } else {
            $datas[] = $break . '[maximum depth reached]';
        }

        return $debugInfo . implode(',', $datas) . $end . ']';
    }
482150
public function write($data, $debug = true)
    {
        if (fwrite($this->_stream, $data . "\r\n") === false) {
            throw new Horde_Imap_Client_Exception(
                Horde_Imap_Client_Translation::r("Server write error."),
                Horde_Imap_Client_Exception::SERVER_WRITEERROR
            );
        }

        if ($debug) {
            $this->_params['debug']->client($data);
        }
    }