laravel-google-chat-log icon indicating copy to clipboard operation
laravel-google-chat-log copied to clipboard

Missing ServiceProvider?

Open muellerat91interactive opened this issue 1 year ago • 0 comments

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.

muellerat91interactive avatar Apr 16 '24 13:04 muellerat91interactive