Logs the data specified.

@param string $name The name of the log context.
@param string $message The message that will be logged.
@param array $data Additional information to log.
@return void No value is returned.
164390
public function log(string $name, string $message, array $data = []): void
    {
        $filename = $this->dir . '/' . $name . '-' . date('Y-m-d') . '.log';
        try {
            $microtime = microtime(true);
            $microtimeParts = explode('.', $microtime);
            $logData = date('H:i:s', $microtime) . ':' . (isset($microtimeParts[1]) ? $microtimeParts[1] : '0') . "\n" . trim($message) . (empty($data) ? '' : "\n" . trim(print_r($data, true))) . "\n\n";
            $fileHandler = fopen($filename, 'ab');
            fwrite($fileHandler, $logData);
            fclose($fileHandler);
        } catch (\Exception $e) {
            throw new \Exception('Cannot write log file (' . $filename . ')');
        }
    }
955691
public function log($level, $message, array $context = [])
    {
        if (isset($context['name'])) {
            $name = $context['name'];
            unset($context['name']);
        } else {
            $name = 'log.' . $level;
        }

        $event = new Event($name);
        $event->setLevel($level)
            ->setMessage($message)
            ->setContext($context);

        self::emit($event);
    }
1053170
public function log($level, $message, array $context = array())
    {
        $this->getApplication()->getInitialContext()->getSystemLogger()->log($level, $message, $context);
    }
947455
public static function log($level, $message, array $context = array())
    {
        App::getBean('Logger')->log($level, $message, static::parseContext($context));
    }
1187151
public function log(string $level, string $message, array $context = array(), $filename = null)
    {
        $this->setLogger($message, $context = [], $filename);
    }
1273006
public function log(array $data)
    {
        $data['query'] = $this->query;
        $data['fields'] = $this->fields;
        call_user_func($this->loggerCallable, $data);
    }
21184
public function log($level, $message, array $context = array()) {
		foreach($this->keyValueArray as $key => $value) {
			if(is_object($value)) {
				if(method_exists($value, '__toString')) {
					$value = (string)$value;
				} else {
					$value = json_encode($value);
				}
			}
			$context[$key] = $value;
		}
		$this->logger()->log($level, $message, $context);
	}
944988
public function notice($message, array $context = []): void {
        $this->log(LogLevel::NOTICE, $message, $context);
    }
407576
public static function log($level, $message, array $context = [], string $channel = self::DEFAULT_CHANNEL): void
    {
        self::getLoggerForChannel($channel)->log($level, $message, $context);
    }
197306
public static function output($message, $data = null)
    {
        if (static::$mode == "html") {
            static::html($message, $data);
        } else {
            static::text($message, $data);
        }
    }
440737
public static function log($level, $message, array $context = [], array $params = [])
    {
        self::init($params);
        self::$instance->log($level, $message, $context);
    }
1147777
protected function log($message)
    {
        if (method_exists($this->io, 'writeError')) {
            $this->io->writeError($message);
        }
        else {
            // @codeCoverageIgnoreStart
            $this->io->write($message);
            // @codeCoverageIgnoreEn
        }
    }
351408
public function log($message, $data)
    {
        // TODO: Implement log() method.
        $this->logMessages->enqueue([
            'date'    => date('Y-m-d H:i:s'),
            'message' => $message,
            'data'    => $data
        ]);

        return $this;
    }
123919
public static function message($name, $message = null)
    {
        if (func_num_args() === 2) {
            return static::$_messages[$name] = $message;
        }
        return isset(static::$_messages[$name]) ? static::$_messages[$name] : static::$_messages['_default_'];
    }
1147934
private function setLogger(string $message, array $context = [], $filename = null)
    {
        if (!$filename) {
            $filename = self::getFileName();
        }

        $file = $this->logPath . $filename;

        if (!file_exists($file)) {
            touch($file);
            $handle = fopen($file, 'r+');
            exec("chmod 777" . $file);
        } else {
            $handle = fopen($file, 'a+');
        }

        if ($context) {
            fwrite($handle, $message . json_encode($context) . "\n");
        } else {
            fwrite($handle, $message . "\n");
        }

        fclose($handle);
    }
1104036
public function logMessage(Message $message): void
    {
        if (in_array($message->getLevel(), $this->config['log'])) {
            if ($this->config['send_immediately']) {

                call_user_func($this->config['exec'], $message);

            } else {
                $this->messages[] = $message;

                if (count($this->messages) == 1) {
                    // register shutdown on first message in queue
                    $self = $this;
                    register_shutdown_function(function () use ($self) {
                        $fn = $self->getExecFunction();
                        call_user_func($fn, $self->getMessages());
                    });
                }
            }
        }
    }
1008115
protected function log($message): void
    {
        if ($this->logger !== null) {
            $this->logger->log($message);
        }
    }