Skip to content

Missing ServiceProvider? #16

@muellerat91interactive

Description

@muellerat91interactive

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions