Skip to content

Log error aren't going to Bugsnag #301

@dbpolito

Description

@dbpolito

Expected behavior

logger()->error('test');

Should go to Bugsnag

Observed behavior

It's not going to Bugsnag

Steps to reproduce

php artisan tinker
logger()->error('test');

Version

  • laravel/framework: 5.4.36
  • bugsnag/bugsnag-laravel: 2.14.1

Additional information

My AppServiceProvider:

<?php

namespace App\Providers;

use Bugsnag\BugsnagLaravel\BugsnagServiceProvider;
use Bugsnag\BugsnagLaravel\Commands\DeployCommand;
use Bugsnag\BugsnagLaravel\Facades\Bugsnag;
use Illuminate\Contracts\Logging\Log;
use Illuminate\Support\ServiceProvider;
use Psr\Log\LoggerInterface;


class AppServiceProvider extends ServiceProvider
{
    public function register()
    {
        if ($this->app->environment('local')) {
            return;
        }

        $this->registerBugsnag();
    }

    protected function registerBugsnag()
    {
        $this->app->register(BugsnagServiceProvider::class);
        $this->commands(DeployCommand::class);

        $this->app->alias('bugsnag.multi', Log::class);
        $this->app->alias('bugsnag.multi', LoggerInterface::class);
        $this->app->alias('Bugsnag', Bugsnag::class);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs discussionRequires internal analysis/discussion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions