Start this profile.

@param string $message [optional]
@param array  $context [optional]

@return $this
@throws Exception
436277
public function start($message = 'Start', $context = [])
    {
        // Check if method was called only with $context
        if (is_array($message)) {
            $context = $message;
            $message = 'Start';
        }

        // A profile can only be started if never started or cleared before
        if ($this->isStarted()) {
            throw new Exception("Profile {$this->getName()} already started.");
        }

        // The main profile
        if (null === $this->name) {
            if ($this->children) {
                throw new Exception("Profile {$this->getName()} must be started before all other profiles.");
            }
            $timeStart = $_SERVER['REQUEST_TIME_FLOAT'] ?? $this->timeCurrent();
        } else {
            $timeStart = $this->timeCurrent();
        }

        // Start counter and first lap
        $this->start  = $timeStart;
        $this->laps[] = $timeStart;

        // Log
        $this->note($message, $context);

        return $this;
    }
641480
protected function logInfo(string $message, array $context = []): void
    {
        if ($this->logger !== null) {
            $this->logger->info($message, $context);
        }
    }
169598
function log($level, $message, array $context = array())
	{
		foreach($this->_loggers as $logger)
			$logger->log($level, $message, $context);

		return $this;
	}
173456
public function error($message, array $context = array()) {
        $context['fromClass'] = get_called_class();
        foreach ($this->loggersInstances as $logger) {
            $logger->error($message, $context);
        }
    }
246375
public function emergency(string $message, array $context = []){
        if($this->logger !== null){
            $this->logger->emergency($message, $context);
        }

        if($this->messagePanel !== null){
            $this->messagePanel->addMessage($message, LogLevel::EMERGENCY);
        }
    }
584506
public function alert($message, array $context = array())
    {
        if (self::isSetLogger()) {
            return self::$logger->alert($message, $context);
        }

        return false;
    }
1279407
public function emergency($message, array $context = array())
    {
        // TODO: Implement emergency() method.
        return $this->addRecord(\Psr\Log\LogLevel::EMERGENCY, $message, $context);
    }
1028192
public function log($level, $message, array $context = [])
    {
        if (isset($this->app) && isset($this->app->logger) && $this->app->logger instanceof \Psr\Log\LoggerInterface) {
            $this->app->logger->log($level, $message, $context);
        } else {
            $this->_echo_stderr("$message\n");
        }

        return $this;
    }
595547
public function critical(string $message, array $context = []){
        if($this->logger !== null){
            $this->logger->critical($message, $context);
        }

        if($this->messagePanel !== null){
            $this->messagePanel->addMessage($message, LogLevel::CRITICAL);
        }
    }
875727
public function emergency($message, array $context = [])
    {
        $this->log(Doozr_Logging_Constant::EMERGENCY, $message, $context);

        return $this;
    }
1340519
public function warning($message, array $context = [])
    {
        $this->checkInitialized();

        foreach ($this->loggers as $logger) {
            $logger->warning($message, $context);
        }
    }
433274
public function notice($message, array $context = array()) {
        $context['fromClass'] = get_called_class();
        foreach ($this->loggersInstances as $logger) {
            $logger->notice($message, $context);
        }
    }
415805
public function process(Message $message, Context $context)
    {
        $container = $this->kernel->getContainer();

        $data = \json_decode($message->getBody());

        $eventName = $this->prefix . $data->uri;
        $payload = $data->path;

        $dispatcher = $container->get('event_dispatcher');
        $dispatcher->dispatch($eventName, new BusEvent($payload));

        return self::ACK;
    }
705791
public static function log($message, array $context = array(), $level = Logger::INFO, $logname = null)
    {
        $_this = self::getInstance();
        if ($_this->getOption('enable_logging')===false) {
            return;
        }
        $default_context = array(
            'url' => $_this->getRequest()->getUrl()
        );
        return self::getInstance()->getLogger()
            ->log($level, $message, array_merge($default_context, $context), $logname);
    }
889152
public function addDebug($message, array $context = array())
    {
        return $this->_instance->addRecord(\Monolog\Logger::DEBUG, $message, $context);
    }
1014921
public function send(string $priority, string $message, array $context = [])
    {
        if (! $this->contextContainsException($context)) {
            $data = [
                'extra' => $this->sanitizer->sanitize($context),
                'level' => $priority,
            ];

            $this->client->captureMessage(
                $message,
                [],
                $data,
                $this->stackTrace->cleanBacktrace(debug_backtrace())
            );

            return;
        }

        /** @var \Exception $exception */
        $exception = $context['exception'];
        unset($context['exception']);

        $exceptionsStack = $this->stackTrace->getExceptions($exception);

        // Adding a first fake exception to log the message
        $stack = $this->stackTrace->cleanBacktrace(debug_backtrace());
        $exceptionsStack[] = [
            'value' => $message,
            'type' => get_class($exception),
            'stacktrace' => [
                'frames' => $this->stackTrace->getStackTraceFrames($stack),
            ],
        ];

        $data = [
            'extra' => $this->sanitizer->sanitize($context),
            'level' => $priority,
            'exception' => [
                'values' => $exceptionsStack,
            ],
        ];

        $this->client->captureMessage($message, [], $data);
    }
1277107
public function alert(string $message, array $context = []){
        if($this->logger !== null){
            $this->logger->alert($message, $context);
        }

        if($this->messagePanel !== null){
            $this->messagePanel->addMessage($message, LogLevel::ALERT);
        }
    }