Count how often this line is visited and put the debug at the end of the script.

@param string $message optional message

@return void
350724
public static function count($message = '') {
		if (!self::$_enabled) {
			return;
		}

		if (self::$ensureByGet && !isset($_GET['debug'])) {
			return;
		}

		/* Get a new ADEBUG object */
		$debug = new THEDEBUG\ADEBUG(array(1));

		/* And its ID (calculated using file and line) */
		$ID = $debug->getID();

		/*
		 * just increment the counter and return if this is		
		 * not the first time called from this file and line,
		 */
		if (isset(self::$counts[$ID])) {
			unset($debug);
			self::$counts[$ID]->variable++;
			return;
		}

		/* Register output on destruction */
		$debug->putOnDestruction = true;

		/* Generate the message or insert the passed one */
		if (empty($message)) {
			$debug->name = sprintf(
				'File %s, Line %s was visited',
				$debug->file,
				$debug->line
			);
		} else {
			$debug->name = $message;
		}

		/* Register callback to add time/s to the counter */
		$debug->addCallback('beforePut', function (&$debug) {
			if ($debug->variable === 1) {
				$debug->variable .= ' time.';
			} else {
				$debug->variable .= ' times.';
			}
		});

		/* Add the debug to the collection of counts */
		self::$counts[$ID] = $debug;
	}
397805
public function log($message)
    {
        if (null !== $this->logger) {
            $logger = $this->logger;
            $logger($message);
        }
    }
990161
public function logDebug($message, $attachment = null) {
        $this->messages[] = "debug: " . $message . print_r($attachment, true);
    }
728867
public function log($message)
	{
		if($this->logLevel == self::LOG_NORMAL) {
			fwrite(STDOUT, "*** " . $message . "\n");
		}
		else if($this->logLevel == self::LOG_VERBOSE) {
			fwrite(STDOUT, "** [" . strftime('%T %Y-%m-%d') . "] " . $message . "\n");
		}
	}
203237
public function debug($message)
    {
        $args = func_get_args();
        array_shift($args);
        return $this->log(Log::Debug, $message, $args);
    }
1047493
protected function _debug( $message, $args = null ) {
		$message = '[Factory] ' . $message;

		if ( func_num_args() == 1 ) {
			Debug::debug( $message );
		} else {
			$args = array_slice( func_get_args(), 1 );
			Debug::debugf( $message, $args );
		}
	}
437978
public function log($message): void
	{
		$defaults = [
			'SEVERITY' => 'INFO',
			'AUDIT_TYPE_ID' => $this->auditTypeId,
			'ITEM_ID' => $this->itemId ?: '',
		];

		$message = $this->logMessToArray($message);

		CEventLog::Add(array_merge($defaults, $message, ['MODULE_ID' => $this->moduleId]));
	}
217976
public function markAsDisappeared($message = null)
    {
        if (!is_null($message)) {
            $this->setMessages($message);
        }
        $this
            ->setStatus(self::STATUS_DISAPPEARED)
            ->setFinishedAt($this->getLastSeen())
            ->save();

        $this->log(sprintf('Job "%s" (id: %s) disappeared. Message: %s', $this->getJobCode(), $this->getId(), $message));
    }
208550
public function debugLog($message)
  {
    if($this->DebugAddTime){
      // adding datetime to message (useful when DebugMethod=='echoplain')
      if($this->DebugMultiLine){
        // multiline is enabled, so add the time for each line in the $message
        $message_changed='';
        foreach(explode("\n",$message) as $sub_msg){
          if($message_changed!==''){
            // only add a newline for each newline we lost due to the explode
            $message_changed.="\n";
          }
          $message_changed.=date("Y-m-d H:i:s ").$sub_msg;
        }
        $message=$message_changed;
      }else{
        $message=date("Y-m-d H:i:s ").$message;
      }
    }
    if($this->DebugMethod=='error_log'){
      // error_log entries are automatically truncated at ~8130 chars.
      // by default the message is displayed as one single line where newlines are replaced by literal \n
      // in fact, all non ascii characters are replaced by escaped values (often \xnn)
      // we support two config settings to change this behaviour: error_log_multiline, error_log_wrap
      // both are enabled by default
      if($this->DebugMultiLine){
        foreach(explode("\n",$message) as $sub_msg){
          if($this->ManagerConfig['error_log_wrap']){
            self::error_log_wrap($sub_msg);
          }else{
            error_log($sub_msg);
          }
        }
      }else{
        if($this->ManagerConfig['error_log_wrap']){
          self::error_log_wrap($message);
        }else{
          error_log($message);
        }
      }
    } else if($this->DebugMethod=='echoplain'){
      echo $message."\n";
    }else{
      echo $message."<br />\n";
    }
  }
9292
public function log($message, $severity = null)
    {
        if (is_null($this->logger)) {
            $this->logger = LogManager::getLogger('propel');
        }

        switch ($severity) {
            case 'crit':
                $method = 'fatal';
                break;
            case 'err':
                $method = 'error';
                break;
            case 'alert':
            case 'warning':
                $method = 'warning';
                break;
            case 'notice':
            case 'info':
                $method = 'info';
                break;
            case 'debug':
            default:
                $method = 'debug';
        }

        // get a backtrace to pass class, function, file, & line to Mojavi logger
        $trace = debug_backtrace();

        // call the appropriate Mojavi logger method
        $this->logger->{$method} (
            $message,
            $trace[2]['class'],
            $trace[2]['function'],
            $trace[1]['file'],
            $trace[1]['line']
            );
    }
506292
protected void debug(String message) {
		final Log log = getLog();
		if (log != null)
			log.debug(message);
	}
416055
protected function verboseLog($message)
    {
        if (!$this->isDryRunEnabled() &&
             $this->getOutput()->getVerbosity() < OutputInterface::VERBOSITY_VERY_VERBOSE) {
            return;
        }

        $this->getOutput()->writeln($message);
    }
894462
protected function log_finish($message, $depth = 0) {
        $this->log($message, $depth);

        if (isset($this->tracestats->$depth)) {
            $startstats = $this->tracestats->$depth;
            $this->log(
                    sprintf("Time taken %s, memory total: %s, Memory growth: %s, Memory peak: %s",
                        microtime_diff($startstats['time'], microtime()),
                        display_size(memory_get_usage()),
                        display_size(memory_get_usage() - $startstats['mem']),
                        display_size(memory_get_peak_usage())
                    ),
                    $depth + 1
                );
        }
    }
1234610
private function log($message)
    {
        if (!is_null($this->logger)) {
            $this->logger->log(
                LogLevel::DEBUG,
                sprintf("[%s] - %s", date('Y-m-d H:i:s'), $message)
            );
        }
    }
320590
public function log($message)
    {
        $messages = (array) $message;
        foreach ($messages as $message) {
            $this->getLogger()->info($this->prependHandle($message));
        }
    }
808936
public static function debug($message, array $extras = [])
    {
        if (self::$logger) {
            self::$logger->debug($message, $extras);
        }
    }
234881
public function debug($message, array $context = [])
    {
        if (! empty($context['label'])) {
            $label = PHP_EOL . "$label" . PHP_EOL . str_repeat('=', strlen($label)) . PHP_EOL;
        }
        else {
            $label = '';
        }

        if (is_string($message)) {
            Crush::$process->debugLog[] = "$label$message";
        }
        else {
            ob_start();
            ! empty($context['var_dump']) ? var_dump($message) : print_r($message);
            Crush::$process->debugLog[] = $label . ob_get_clean();
        }
    }