Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing ServiceProvider? #16

Open
muellerat91interactive opened this issue Apr 16, 2024 · 0 comments
Open

Missing ServiceProvider? #16

muellerat91interactive opened this issue Apr 16, 2024 · 0 comments

Comments

@muellerat91interactive
Copy link

muellerat91interactive commented Apr 16, 2024

I had to create a ServiceProvider

<?php

namespace App\Providers;

use Enigma\GoogleChatHandler;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\ServiceProvider;

class GoogleChatServiceProvider extends ServiceProvider
{

	/**
	 * Register Papertrail Service Provider
	 *
	 * @return void
	 */
	public function register()
	{
		$monolog = Log::getLogger();
		$gch = new GoogleChatHandler();
		$gch->setLevel(config('logging.channels.google-chat.level'));
		$monolog->pushHandler($gch);
	}
} 

And add it to config\app.php to get it to work (adding App\Providers\GoogleChatServiceProvider::class, in the 'providers' section).

Did I miss something in your setup description from the Readme? Perhaps you could add this to your setup description?
I'm using Laravel 9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant