Returns the Logger identified by the channel.

@param string $channel The log channel.

@return Logger
501143
public static function getLogger(string $channel): Logger
    {
        if (empty(static::$loggers[$channel])) {
            static::$loggers[$channel] = new Logger($channel);
        }

        return static::$loggers[$channel];
    }
1353319
public function addLogger($channel, LoggerInterface $logger)
    {
        $channel = strtolower($channel);

        $this->loggers[$channel] = $logger;

        return $this;
    }
314762
public function getLogger($channel = 'default')
    {
        if (isset($this->loggers[$channel])) {
            return $this->loggers[$channel];
        }

        /** @var Logger $logger */
        $logger = $this->getContainer()->get(LoggerInterface::class, [$channel]);

        $this->loggers[$channel] = $logger;

        /** @var LoggerInterface $contract */
        $contract = $this->validateContract($this->loggers[$channel], LoggerInterface::class);
        return $contract;
    }
429056
public static function getInstance(string $name): \Swoole\Channel
    {
        if(!static::$isInited)
        {
            throw new \RuntimeException('getInstance failed, ChannelManager is not initialized');
        }
        if(!isset(static::$channels[$name]))
        {
            throw new \RuntimeException(sprintf('GetInstance failed, %s is not found', $name));
        }
        return static::$channels[$name];
    }
527788
public function getLogger($name = 'defaultLogger')
    {
        if (!isset($this->loggers[$name])) {
            $this->loggers[$name] = $this->buildLogger($name);
        }

        return $this->loggers[$name];
    }
1025878
public function removeChannel($channel)
    {
        if ($channel instanceof ChannelInterface) {
            $channel = $channel->getId();
        }

        $channel = (string) $channel;

        if (false !== ($key = array_search($channel, $this->channels))) {
            unset($this->channels[$key]);
        }

        return $this;
    }
1241351
private function _GrpcStreamStream($channel)
    {
        return function ($method,
                         $deserialize,
                         array $metadata = [],
                         array $options = []) use ($channel) {
            $call = $this->call_invoker->BidiStreamingCall(
                $channel,
                $method,
                $deserialize,
                $options
            );
            $jwt_aud_uri = $this->_get_jwt_aud_uri($method);
            if (is_callable($this->update_metadata)) {
                $metadata = call_user_func(
                    $this->update_metadata,
                    $metadata,
                    $jwt_aud_uri
                );
            }
            $metadata = $this->_validate_and_normalize_metadata(
                $metadata
            );
            $call->start($metadata);

            return $call;
        };
    }
59219
public static function getLogger($module = "")
    {
        if (is_object($module))
            $module = get_class($module);
        elseif (empty($module) || strtoupper($module) === "ROOT")
            $module = "";
        $module = trim(str_replace('\\', '.', $module), ". \\");

        if (!isset(self::$module_loggers[$module]))
            self::$module_loggers[$module] = new Logger($module);

        return self::$module_loggers[$module];
    }
137103
public function all($channel = '')
    {
        $channel = $channel ?: static::$defaultChannel;
        return $this->channelOrFail($channel)->all($channel);
    }
557762
public function getLogger()
    {
        if (!$this->logger) {
            $this->logger = $this->getClient()->getLogger();
        }
        return $this->logger;
    }
924375
public function stack(array $channels, $channel = null)
    {
        return new Logger(
            $this->createStackDriver(compact('channels', 'channel')),
            $this->app['events']
        );
    }
841400
public function createChannel(Channel $channel)
    {
        $op = $this->sendCreateChannelOperation($channel);

        // waiting for create operation finishes
        $op = $this->awaitOperation($op);

        if ($op->getState() != OperationState::Succeeded) {
            return null;
        }

        // get and return the createChannel
        return $this->getChannel($op->getTargetEntityId());
    }
1139871
private function _GrpcStreamUnary($channel)
    {
        return function ($method,
                         $deserialize,
                         array $metadata = [],
                         array $options = []) use ($channel) {
            $call = $this->call_invoker->ClientStreamingCall(
                $channel,
                $method,
                $deserialize,
                $options
            );
            $jwt_aud_uri = $this->_get_jwt_aud_uri($method);
            if (is_callable($this->update_metadata)) {
                $metadata = call_user_func(
                    $this->update_metadata,
                    $metadata,
                    $jwt_aud_uri
                );
            }
            $metadata = $this->_validate_and_normalize_metadata(
                $metadata
            );
            $call->start($metadata);
            return $call;
        };
    }
702989
public function getLogger($name)
    {
        foreach ($this->observer as $logger) {
            if (strtolower($logger->getName()) === strtolower($name)) {
                return $logger;
            }
        }

        return;
    }
310549
public function channel($channel)
    {
        $channel = $this->client->get(config('twitch-api.api_url') . '/kraken/channels/' . $channel);

        return $channel->json();
    }
147899
public function hasLogger($channel): bool
    {
        $channel = strtolower($channel);

        return isset($this->loggers[$channel]);
    }
391195
private function _UnaryUnaryCallFactory($channel)
    {
        if (is_a($channel, 'Grpc\Internal\InterceptorChannel')) {
            return function ($method,
                             $argument,
                             $deserialize,
                             array $metadata = [],
                             array $options = []) use ($channel) {
                return $channel->getInterceptor()->interceptUnaryUnary(
                    $method,
                    $argument,
                    $deserialize,
                    $metadata,
                    $options,
                    $this->_UnaryUnaryCallFactory($channel->getNext())
                );
            };
        }
        return $this->_GrpcUnaryUnary($channel);
    }