protected function render(Args $args)
    {
        $format = $this->registry->get(
            sprintf(
                'format/%s/%s',
                $this->registry->get('env'),
                self::$reverseLevel[$args->get('level')]
            ),
            self::DEFAULT_FORMAT
        );
        $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 5);
        $message = str_replace(
            [
                '%DATE%',
                '%TIME%',
                '%LEVEL%',
                '%SOURCE%',
                '%FILE%',
                '%LINE%',
                '%MESSAGE%',
            ],
            [
                date('Y-m-d'),
                date('H:i:s'),
                self::$levelToString[$args->get('level')],
                $args->get('source'),
                $backtrace[4]['file'],
                $backtrace[4]['line'],
                $args->get('message')
            ],
            $format
        );

        return $message;
    }