Get a log.

@param  string     $date
@param  mixed|null $default

@return Log

@throws LogNotFound
551313
public function get($date, $default = null)
    {
        if (!$this->has($date)) {
            throw new Exception('Log not found in this date [' . $date . ']');
        }

        return parent::get($date, $default);
    }
723750
public static function sunday($date = null)
    {
        if ($date) {
            return Carbon::parse($date)->startOfWeek(Carbon::SUNDAY);
        }

        return Carbon::now()->startOfWeek(Carbon::SUNDAY);
    }
818137
public function getUserDate($date)
    {
        $date = DBDatetime::create()->setValue($date);
        $member = Security::getCurrentUser();
        return $date->FormatFromSettings($member);
    }
886822
public function get(string $date = null) : array
    {
        if ($date === null) {
            $date = \date('Y-m-d');
        }

        return [
            'queued' => $this->queue->count(),
            'pass' => $this->queue->getStatsByType($date, 'pass'),
            'fail' => $this->queue->getStatsByType($date, 'fail'),
            'retry' => $this->queue->getStatsByType($date, 'retry'),
            'cancel' => $this->queue->getStatsByType($date, 'cancel')
        ];
    }
1236113
public function get($key, $default = null)
    {
        $return = null;

        if (self::$cacheGetter) {
            $return = call_user_func_array(self::$cacheGetter, func_get_args());
        } else {
            $file = $this->getCacheFile($key);

            if (file_exists($file) && ($data = unserialize(file_get_contents($file)))) {
                $return = $data['expired_at'] > time() ? $data['data'] : null;
            }
        }

        if (!$return) {
            $return = is_callable($default) ? $default($key) : $default;
        }

        return $return;
    }
866034
public function download(RequestListener $listener, $date)
    {
        $filename = app('logger.filesystem')->getLogFilename($date);
        $path     = dirname(config('request-logger.logger.file')) . DIRECTORY_SEPARATOR . $filename;
        if (!file_exists($path)) {
            return $listener->downloadFailed();
        }
        return response()->download($path);
    }
1203398
public function get($key, $default = null)
    {
        $value  = $this->raw($key, $default);
        $escape = $this->escape;
        return $escape($value);
    }
693024
public function log()
    {
        if ($this->log === null) {
            $this->log = $this->config()->defaultLog();
        }
        return $this->log;
    }
216466
protected function resolveCarbon($date = null)
    {
        if (!$date) {
            return $this->nowWithSameTz();
        }

        if (is_string($date)) {
            return static::parse($date, $this->getTimezone());
        }

        static::expectDateTime($date, ['null', 'string']);

        return $date instanceof self ? $date : static::instance($date);
    }
1000185
public function get(string $key, $default = null)
    {
        if ($this->has($key)) {
            return parent::get($key)['value'];
        }

        return $default;
    }
384611
private function getLogPath($date)
    {
        $path = "{$this->storagePath}/http-{$date}.log";

        if (!$this->filesystem->exists($path)) {
            throw new Exception(
            'The log(s) could not be located at : ' . $path
            );
        }

        return realpath($path);
    }
1355498
public static function getLogger($logName = 'default')
	{
		$filename = new LogConfigFilenameProcessor('log4php');

		if (!$filename->Exists())
			throw new NotFoundException('Log4php config file not found.');
		else
			\Logger::configure($filename->FullQualifiedNameAndPath());
		
		return \Logger::getLogger($logName);
	}
1295131
public function getDate() : ?string 
    {
        if ( ! $this->hasDate()) {
            $this->setDate($this->getDefaultDate());
        }
        return $this->date;
    }
996455
public function data(string $key, $default = null)
    {
        if (is_null($this->data)) {
            return $default;
        }

        return data_get($this->data, $key, $default);
    }
53710
public function getDate() : ?int 
    {
        if ( ! $this->hasDate()) {
            $this->setDate($this->getDefaultDate());
        }
        return $this->date;
    }
1254064
public function getMessage($rule, $default = NULL)
    {
        $messages = $this->getMessages();
        if (isset($messages[$rule])) {
            return $messages[$rule];
        } else {
            return $default;
        }
    }
1353977
public function getDate($date, string $pattern = "Y-m-d")
    {
        if (!$date) {
            $this->data['ano'] = date("Y");
            $this->data['mes'] = date("m");
            $this->data['dia'] = date("d");
        } else {
            $this->prepareDate($date);
        }

        if($this->erro) {
            return null;
        } else {
            $originalDate = $this->data['ano'] . '-' . $this->data['mes'] . '-' . $this->data['dia'];
            return date($pattern, strtotime($originalDate));
        }
    }