Closed WildEgo closed 5 years ago
You're now able to disable logging via
Client::setLogging(false);
I'll work out setting up Laravel logging soon.
This will be released under 1.3.7
Using
LeagueAPI::setLogging(false);
throws me:
Symfony\Component\Debug\Exception\FatalThrowableError : Return value of RiotQuest\Components\Client\Application::getManager() must be an instance of RiotQuest\Components\RateLimit\RateLimiter, null returned
at E:\XAMPP\htdocs\----\vendor\supergrecko\riot-quest\src\RiotQuest\Components\Client\Application.php:212
208| * @return RateLimiter
209| */
210| public function getManager(): RateLimiter
211| {
> 212| return $this->manager;
213| }
Looks like the service provider isn't registering properly. I'm going to look into it.
In the meantime, could you try manually adding RiotQuest\ServiceProviders\LeagueServiceProvider
to your laravel config? If that doesn't work, create a new service provider which runs the Client::boot()
method.
It just happens whenever I call setLogging
besides that it's perfect, also any way we could move stuff like that to the .env file like other variables
Yeah it breaks on setLogging because the client tries to boot itself it it hasn't when you call the API. when you call setLogging it doesn't have that self recovery so it throws. Sure I can move it into the env variables.
This update will be released under the 1.5.0 tag. Please mind the backwards incompatible change by replacing any existing Client::setLogging(false)
calls to Client::disableLogging()
You are now able to use this code in Laravel
// To retrieve a channel from laravel logger:
$logger = Log::channel('league'); // returns LoggerInterface
Client::setLogger($logger);
Describe the feature you'd like I'd like to have it so I'm able to disable logging and or get the ability to log using Laravel's default solution.