src/Log/Log.php
protected function log($level, $message)
    {
        if (is_array($message) || is_object($message)) {
            // $message = json_encode($message);
            $message = print_r($message, true);
        }

        $text = '[' . date($this->timeFormat,
                time()) . '] - [' . strtoupper($level) . '] - [' . http()->getClientIP() . '] --> ' . $message;
        $this->save($text);
    }
protected function log($level, $message)
    {
        if (is_array($message) || is_object($message)) {
            // $message = json_encode($message);
            $message = print_r($message, true);
        }

        $text = '[' . date($this->timeFormat,
                time()) . '] - [' . strtoupper($level) . '] - [' . http()->getClientIP() . '] --> ' . $message;
        $this->save($text);
    }
Create log text to file

@param string $level
@param mixed  $message

@return void
@throws