Sends/Writes an info message to the log

@param string|array $message
@param string       $category

@return static
506148
public function info($message, $category = null)
    {
        return $this->log(self::LEVEL_INFO, $message, $category);
    }
199791
public function setCategory($category)
    {
        self::writeFullTag(
            $category,
            'category',
            true,
            'video:category',
            $this->validator,
            'validateCategory',
            $this->exception,
            'Provided category value is not a valid.'
        );

        return $this;
    }
941759
public static function create($code, $message = null, $category = null)
    {
        return new class($message, $code, $category) extends ControlledError
        {
            /**
             * @var string
             */
            protected $category;

            /**
             * @param string $message
             * @param string $code
             * @param null   $category
             */
            public function __construct($message, $code, $category = null)
            {
                if ($category) {
                    $this->category = $category;
                }
                parent:: __construct($message, $code);
            }

            /**
             * @return string
             */
            public function getCategory(): string
            {
                return $this->category ?? parent::getCategory();
            }
        };
    }
879274
public function log($message)
    {
        $app = Base::instance();
        if ($app['LOG_FILE']) {
            if (null === $this->logger) {
                $this->logger = new Log($app['LOG_FILE']);
            }
            $this->logger->write($message);
        }

        return $this;
    }
751844
public function log($level, $message, $category = null)
    {
        if ($level > $this->_level) {
            return $this;
        }

        if ($category !== null && !is_string($category)) {
            $message = [$message . ': :param', 'param' => $category];
            $category = null;
        }

        if (is_array($message) && count($message) === 1 && isset($message[0])) {
            $message = $message[0];
        }

        $request_id = empty($_SERVER['DOCUMENT_ROOT']) ? '' : $this->request->getServer('HTTP_X_REQUEST_ID');

        $log = new Log();

        $log->host = gethostname();
        $log->client_ip = empty($_SERVER['DOCUMENT_ROOT']) ? '' : $this->request->getClientIp();
        $log->level = self::$_levels[$level];
        $log->request_id = $request_id ? preg_replace('#[^a-zA-Z\d-_\.]#', 'X', $request_id) : '';

        if ($message instanceof \Exception) {
            $log->category = $category ?: 'exception';
            $log->file = basename($message->getFile());
            $log->line = $message->getLine();
        } else {
            if (MANAPHP_COROUTINE) {
                /** @noinspection PhpUndefinedMethodInspection */
                $traces = \Swoole\Coroutine::getBackTrace(0, DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS, 7);
            } else {
                $traces = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS, 7);
            }
            /** @noinspection NestedTernaryOperatorInspection */
            $log->category = $category ?: $this->_inferCategory($traces);
            $location = $this->_getLocation($traces);
            if (isset($location['file'])) {
                $log->file = basename($location['file']);
                $log->line = $location['line'];
            } else {
                $log->file = '';
                $log->line = 0;
            }
        }

        $log->message = is_string($message) ? $message : $this->formatMessage($message);
        $log->timestamp = microtime(true);

        $this->eventsManager->fireEvent('logger:log', $this, $log);

        /**
         * @var \ManaPHP\Logger\AppenderInterface $appender
         */
        foreach ($this->_appenders as $name => $value) {
            if (is_object($value)) {
                $appender = $value;
            } elseif (is_string($value)) {
                $appender = $this->getAppender($name);
            } elseif (is_array($value)) {
                if (isset($value['level']) && $level > $value['level']) {
                    continue;
                }
                $appender = isset($value['instance']) ? $value['instance'] : $this->getAppender($name);
            } else {
                throw new MisuseException('');
            }

            $appender->append($log);
        }

        return $this;
    }
654234
public function writeToLog($message)
    {

        if (is_null($this->logger)) {
            $this->setLogger();
        }

        if (empty($this->sbf_id) || $this->sbf_id == \sb\Gateway::$cookie['SBF_ID']) {

            $message = preg_replace("~\t~", " ", $message);
            return $this->logger->{$this->log_str}($message);
        }
    }
402949
public function addLanguageItem($category, $message)
    {
        $this->_languageElements[$category][$message] = true;

        $coloredCategory = Console::ansiFormat($category, [Console::FG_YELLOW]);
        $coloredMessage = Console::ansiFormat($message, [Console::FG_YELLOW]);

        $this->stdout('Detected language element: [ ' . $coloredCategory . ' ] ' . $coloredMessage);
    }
402861
function writeLog(type, category){
    return function(messages) {
        var funcs = [];

        _.each(messages, function(message){
            funcs.push(this.client.logAsync(message, [type, category]));
        }.bind(this));

        return BB.all(funcs);
    };

}
369132
public function update(DocumentCategory $category)
    {
        $attributes = request()->validate(DocumentCategory::$rules, DocumentCategory::$messages);

        $category = $this->updateEntry($category, $attributes);

        return redirect_to_resource();
    }
1267251
public static function getOrCreateFileLogger(string $category, string $logfilePath): LoggerInterface
    {
        $hash = sha1($category . $logfilePath);

        if (!isset(self::$instance[$hash])) {
            $logger = new Logger($category);
            $logger->pushHandler(new StreamHandler($logfilePath, Logger::DEBUG));

            self::$instance[$hash] = $logger;
        }

        return self::$instance[$hash];
    }
266487
public function write($level, $message, $context = null)
	{
		if (!is_string($message))
			throw new \InvalidArgumentException("Message must be a string");

		if ($this->enabled)
		{
			$record = new LogRecord();
			$record->context = $context;
			$record->message = $message;
			$record->loggerName = $this->name;
			$record->level = $level;
			$record->formatted = $this->format;

			$res = $record;
			foreach (self::$settings["parsers"] as $name => $className)
			{
				$inst = new $className($res);
				$res = $inst->parse();
			}

			foreach ($this->writers as $writer)
				$writer->handle($level, $res);
		}
	}
40371
public function addCategory(BlogCategory $category)
    {
        $category->setBlog($this);
        $this->categories->add($category);

        return $this;
    }
1304739
public function existsMessage($language, $category, $message)
    {
        $key = $language . '/' . $category;
        if (!isset(static::$_messages[$key])) {
            static::$_messages[$key] = $this->loadMessages($category, $language);
        }
        if (isset(static::$_messages[$key][$message]) && static::$_messages[$key][$message] !== '') return true;
        else return false;
    }
1243561
public function write(string $level, string $message, array $context)
    {
        $this->logger->log($level, $message, $context);
    }
469420
public function write(string $level, string $message, array $context)
    {
        $lvl_num = Logger::getLevelNumeric($level);
        if ($lvl_num < $this->min_level)
            return;

        $fmt = $this->format($level, $message, $context);
        $this->writeLine($fmt);
    }
416539
public function write($level, $message, array $context = array())
    {
        $color = $this->defaultColor;
        if (isset($this->levelColors[$level]) && $this->levelColors[$level]) {
            $color = $this->levelColors[$level];
        }

        $context = array(
            '__context' => $context,
            'color' => $color
        );

        $log = $this->format($level, $message, $context);
        $this->setLastLogLine($log);
        echo $log;
    }
204645
public function info($message, array $context = array())
    {
        // TODO: Implement info() method.
        return $this->addRecord(\Psr\Log\LogLevel::INFO, $message, $context);
    }