public function log()
    {
        $result = [];
        if ($this->hasRequestParameter('messages')) {
            $messages = json_decode($this->getRawParameter('messages'), true);
            foreach ($messages as $message) {
                \common_Logger::singleton()->log($this->getLevel($message['level']), json_encode($message), ['frontend']);
            }
        }
        $this->returnJson($result);
    }