Attempt to get the log from the local cache.

@param  string $name
@return \Psr\Log\LoggerInterface
514428
protected function get($name)
    {
        try {
            return $this->channels[$name] ?? with(
                $this->resolve($name), function ($logger) use ($name) {
                    return $this->channels[$name] = $this->tap($name, new Logger($logger));
                }
            );
        } catch (Throwable $e) {
            return tap(
                $this->createEmergencyLogger(), function ($logger) use ($e) {
                    $logger->emergency(
                        'Unable to create configured logger. Using emergency logger.', [
                        'exception' => $e,
                        ]
                    );
                }
            );
        }
    }
141362
public Log getLog(String name) {
		Log log = logCache.get(name);
		if (null == log) {
			log = createLog(name);
			logCache.put(name, log);
		}
		return log;
	}
1002790
public function createLogger($name)
    {
        // short circuit for cached logger objects
        if (true === array_key_exists($name, $this->_logger)) {
            return $this->_logger[$name];
        }

        $loggerConfig  = $this->_getLoggerConfig($name);
        $handlers      = $this->createHandlers($loggerConfig);
        $processors    = $this->createProcessors($loggerConfig);
        $logger        = new Monolog\Logger(
            $name,
            $handlers,
            $processors
        );

        // cache created logger
        $this->_logger[$name] = $logger;

        return $logger;
    }
491551
static function create($name)
    {
        $logger = new Logger($name);
        $filename = SettingsPath::LOGS . mb_strtolower($name, 'UTF-8') . '.log';
        $handler = new RotatingFileHandler($filename);

        $handler->setFilenameFormat('{date}-{filename}', 'Y/m/d');

        $logger->pushHandler($handler);

        return $logger;
    }
546495
protected function get(string $name, callable $callback)
    {
        if (isset($this->cache[$name])) {
            return $this->cache[$name];
        }

        return $this->cache[$name] = call_user_func($callback, $name);
    }
527788
public function getLogger($name = 'defaultLogger')
    {
        if (!isset($this->loggers[$name])) {
            $this->loggers[$name] = $this->buildLogger($name);
        }

        return $this->loggers[$name];
    }
606347
public function getByName($name)
    {
        return isset($this->loggers[$name]) ? $this->loggers[$name] : null;
    }
642657
public static function get($name)
    {
        if (isset(self::$_cached_settings[$name])) {
            return self::$_cached_settings[$name];
        }
        return NULL;
    }
1289243
public static function create($name)
    {
        $logger = new Logger($name);

        $localLogConfig = config('logger.local_log');
        if($localLogConfig['enabled'] && !in_array($name, $localLogConfig['exclude_names'])) {
            $streamHandler = self::streamHandler($name);
            $logger->pushHandler($streamHandler);
        }

        $logstashConfig = config('logger.logstash');
        if($logstashConfig['enabled'] && !in_array($name, $logstashConfig['exclude_names'])){
            $gelfHandler = self::logStashHandler($logstashConfig);
            $logger->pushHandler($gelfHandler);
        }

        $requestId = Request::header('x-request-id');
        $logger->setRequestId($requestId);

        return $logger;
    }
1163380
public static function getResource(string $name)
    {
        $resource = static::getInstance($name)->getResource();

        if(RequestContext::exsits() && $resource)
        {
            static::pushResourceToRequestContext($resource);
        }

        return $resource;
    }
513126
public function get($name)
    {
        $file = $this->cacheFileNameGenaretor($name);
        $file = $this->inPath($file);

        $content = $this->getFileSystem()->read($file);
        $parsed = $this->parseContent($content);

        if (count($parsed) === 2) {
            list($time, $content) = $parsed;

            if ($this->checkTime($time)) {
                return $content;
            }else{
                $this->delete($file);
            }
        }

        return false;
    }
184322
public function get($name = ''){
            if(false === $var = xcache_get($name)){
                xcache_set($name, $var = parent::get($name));
            }

            return $var;
        }
957279
private function _getLoggerConfig($name)
    {
        if (false === array_key_exists('logger', $this->_config)) {
            throw new MonologCreator\Exception("no logger configuration found");
        }

        if (false === array_key_exists('_default', $this->_config['logger'])) {
            throw new MonologCreator\Exception(
                "no configuration found for logger: _default"
            );
        }

        $loggerConfig = $this->_config['logger']['_default'];

        if (true === array_key_exists($name, $this->_config['logger'])) {
            $loggerConfig  = $this->_config['logger'][$name];
        }

        if (false === array_key_exists('handler', $loggerConfig)) {
            throw new MonologCreator\Exception(
                "no handler configurated for logger: " . $name
            );
        }

        if (false === array_key_exists('level', $loggerConfig)) {
            throw new MonologCreator\Exception(
                "no level configurated for logger: " . $name
            );
        }

        if (false === array_key_exists($loggerConfig['level'], $this->_levels)) {
            throw new MonologCreator\Exception(
                "invalid level: " . $loggerConfig['level']
            );
        }

        return $loggerConfig;
    }
176408
public static function entityManager($name = 'default')
    {
        if (isset(self::$entityManagers[$name])) {
            return self::$entityManagers[$name];
        }
        $databaseConnection = self::connection($name)->getDbalConnection();

        if (Configuration::get('app.env') == 'development') {
            $cache = new ArrayCache();
        } else { // @codeCoverageIgnore
            $cache = new FilesystemCache(Configuration::get('app.cache')); // @codeCoverageIgnore
        }

        $config = new \Doctrine\ORM\Configuration();
        $config->setMetadataCacheImpl($cache);
        $driver = $config->newDefaultAnnotationDriver([APPPATH . 'Entity'], false);

        $config->setMetadataDriverImpl($driver);
        $config->setQueryCacheImpl($cache);

        $proxyDir = APPPATH . 'Proxy';
        $proxyNamespace = 'App\Proxy';

        $config->setProxyDir($proxyDir);
        $config->setProxyNamespace($proxyNamespace);
        Autoloader::register($proxyDir, $proxyNamespace);

        $loggerChain = new LoggerChain();
        if (Configuration::get('app.env') == 'development') {
            $config->setAutoGenerateProxyClasses(true);

            $loggerChain->addLogger(new DoctrineLogBridge(\Logger::getInstance()->getMonologInstance()));
            $loggerChain->addLogger(DebugBarHelper::getInstance()->getDebugStack());
        } else { // @codeCoverageIgnore
            $config->setAutoGenerateProxyClasses(false); // @codeCoverageIgnore
        }
        $em = EntityManager::create($databaseConnection, $config);

        $em->getConnection()->getConfiguration()->setSQLLogger($loggerChain);
        $em->getConfiguration()->setSQLLogger($loggerChain);

        self::$entityManagers[$name] = $em;
        return $em;
    }
682078
public function getLogger($name)
    {
        if (!array_key_exists($name, $this->logRegistry)) {
            throw new \Exception('LogHandler named ['.$name.'] does not exist');
        }

        return $this->logRegistry['name'];
    }
933371
public function logger($name = null)
	{
		$name = $name ?: $this->getDefaultLog();

		// If the given driver has not been created before, we will create the instances
		// here and cache it so we can return it next time very quickly. If there is
		// already a driver created by this name, we'll just return that instance.
		if (! isset($this->loggers[$name]))
		{
			$this->loggers[$name] = $this->createLog($name);
		}

		return $this->loggers[$name];
	}
149101
private function createCache(string $name)
	{
		$builder = $this->getContainerBuilder();

		$cache = $builder->addDefinition($this->prefix('cache.' . $name))
			->setClass(Cache::class)
			->setArguments(['@Nette\Caching\IStorage', $this->debugMode])
			->addSetup('$service->setNamespace(?)', [$this->prefix('cache.' . $name)]);

		return $cache;
	}