@param $name

@return \Monolog\Handler\StreamHandler;
4133
public static function streamHandler($name)
    {
        $suffix = date('Y-m-d-H');
        $date = date('Y-m-d');
        $pathName = str_replace('.', '/', $name);
        $streamHandler = new StreamHandler(storage_path("logs/$date/$pathName/$name-$suffix.log"));
        $streamHandler->setFormatter(new LineFormatter(null, null, true, false));
        return $streamHandler;
    }
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'];
    }
726454
public function getRpc($name)
    {
        if (!$this->hasRpc($name)) {
            throw new \InvalidArgumentException(sprintf('A RPC handler named "%s" has not been registered.', $name));
        }

        return $this->rpcHandlers[$name];
    }
1215344
protected function getRouter($name)
    {
        if ($this->basic->exists($name)) {
            return $this->basic;
        }

        if ($this->dynamic->exists($name)) {
            return $this->dynamic;
        }
    }
1033103
public static function getLogger($name)
    {
        return Registry::hasLogger($name) ? Registry::getInstance($name) : self::createLogger($name);
    }
108252
protected function get($name)
    {
        try {
            return $this->channels[$name] ?? ($this->channels[$name] = $this->resolve($name));
        } catch (\Throwable $e) {
            $logger = $this->createEmergencyLogger();

            $logger->emergency('Unable to create configured logger. Using emergency logger.', [
                    'exception' => $e,
                ]);

            return $logger;
        }
    }
690082
protected static function createLogger(string $name): LoggerInterface
    {
        $config       = static::$config;
        $loggerConfig = $config[$name];
        $handler      = $loggerConfig['handler']['class'];
        $params       = $loggerConfig['handler']['params'] ?? [];

        array_unshift($params, "{$config['folder']}/{$config['prefix']}.$name.log");

        return (new Logger($name))->pushHandler(new $handler(...$params));
    }
1323215
protected function getHandler($file, $level)
    {
        if (empty(self::$handler)) {
            $handler = new StreamHandler($file, $level);
            $handler->setFormatter($this->getCustomFormatter());
            self::$handler = $handler;
        }

        return self::$handler;
    }
527788
public function getLogger($name = 'defaultLogger')
    {
        if (!isset($this->loggers[$name])) {
            $this->loggers[$name] = $this->buildLogger($name);
        }

        return $this->loggers[$name];
    }
917743
protected function createEventMiddleware(string $name) : Definition
    {
        $eventMiddleWare = new Definition('%eight_points_guzzle.middleware.event_dispatcher.class%');
        $eventMiddleWare->addArgument(new Reference('event_dispatcher'));
        $eventMiddleWare->addArgument($name);
        $eventMiddleWare->setPublic(true);

        return $eventMiddleWare;
    }
1367392
public function get(string $name): array
    {
        if (!$this->has($name)) {
            throw new NoFileHandlersException($name);
        }

        return $this->handlers[$name];
    }
774149
protected function getMonologHandler()
    {
        return (new StreamHandler($this->path('storage', 'logs/netforce.log'), Logger::DEBUG))->setFormatter(new LineFormatter(null, null, true, true));
    }
491018
public static function instance($name = 'default')
    {
        if (!isset(static::$_instances[$name])) {
            static::$_instances[$name] = new EventDispatcher();
        }

        return static::$_instances[$name];
    }
1145209
public function channel(string $name): Channel
    {
        return new Channel(
            $this->baseUrl->append($name),
            $this->client
        );
    }
122825
public static function iterate($name)
    {
        $buffer = [];
        foreach (self::trigger($name) as $hook) {
            $buffer = array_merge($buffer, $hook->getIterations());
        }
        
        return $buffer;
    }
576090
public function getStream($name)
    {
        $stream = false;

        if($this->isRegistered($name))
        {
            if(isset($this->__streams[$name])) {
                $stream = $this->__streams[$name];
            } else {
                $stream = 'lib:filesystem.stream.'.$name;
            }
        }

        return $stream;
    }
1160366
public static function factory($name)
    {
        if (!isset(self::$services[$name])) {
            throw new \RuntimeException("The service [$name] don't register.");
        }

        $service = self::$services[$name];

        if (\is_object($service) && method_exists($service, '__invoke')) {
            return $service();
        }

        return $service;
    }