laravel / cashier-stripe

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.
https://laravel.com/docs/billing
MIT License
2.38k stars 679 forks source link

laravel.EMERGENCY: Unable to create configured logger. #860

Closed jessehorne closed 4 years ago

jessehorne commented 4 years ago

Description:

I recently installed Cashier 10 and ever since then I've been getting the following errors many many times in my laravel.log. I'm using the default 'stack' logging option. I didn't have this issue at all until I installed Cashier.

Here's my stack trace.

[2020-02-03 23:22:40] laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (InvalidArgumentException(code: 0): Log [default] is not defined. at /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:192)
[stacktrace]
#0 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(118): Illuminate\\Log\\LogManager->resolve('default')
#1 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(98): Illuminate\\Log\\LogManager->get('default')
#2 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(87): Illuminate\\Log\\LogManager->driver('default')
#3 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/cashier/src/CashierServiceProvider.php(64): Illuminate\\Log\\LogManager->channel('default')
#4 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Container/Container.php(799): Laravel\\Cashier\\CashierServiceProvider->Laravel\\Cashier\\{closure}(Object(Illuminate\\Foundation\\Application), Array)
#5 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Container/Container.php(681): Illuminate\\Container\\Container->build(Object(Closure))
#6 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Container/Container.php(629): Illuminate\\Container\\Container->resolve('Stripe\\\\Util\\\\Log...', Array)
#7 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(769): Illuminate\\Container\\Container->make('Stripe\\\\Util\\\\Log...', Array)
#8 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/cashier/src/CashierServiceProvider.php(77): Illuminate\\Foundation\\Application->make('Stripe\\\\Util\\\\Log...')
#9 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/cashier/src/CashierServiceProvider.php(19): Laravel\\Cashier\\CashierServiceProvider->registerLogger()
#10 [internal function]: Laravel\\Cashier\\CashierServiceProvider->boot()
#11 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(32): call_user_func_array(Array, Array)
#12 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Container/Util.php(36): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#13 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(90): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#14 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(34): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#15 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Container/Container.php(590): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#16 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(829): Illuminate\\Container\\Container->call(Array)
#17 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(812): Illuminate\\Foundation\\Application->bootProvider(Object(Laravel\\Cashier\\CashierServiceProvider))
#18 [internal function]: Illuminate\\Foundation\\Application->Illuminate\\Foundation\\{closure}(Object(Laravel\\Cashier\\CashierServiceProvider), 16)
#19 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(813): array_walk(Array, Object(Closure))
#20 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\\Foundation\\Application->boot()
#21 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(212): Illuminate\\Foundation\\Bootstrap\\BootProviders->bootstrap(Object(Illuminate\\Foundation\\Application))
#22 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(320): Illuminate\\Foundation\\Application->bootstrapWith(Array)
#23 /Users/jessehorne/Source/binarycocoa/uppit/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\\Foundation\\Console\\Kernel->bootstrap()
#24 /Users/jessehorne/Source/binarycocoa/uppit/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#25 {main}
"} 
driesvints commented 4 years ago

Hey there,

Since this is the first report we got about this and v10 has been out for quite a while already I suspect something is wrong with your configuration defaults.

Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to report back and I'll gladly help you out and re-open this issue.

Thanks!

gRoberts84 commented 4 years ago

I had to change CASHIER_LOGGER=default to CASHIER_LOGGER=stack.

Seems that default isn't resolved based on 'default' => env('LOG_CHANNEL', 'stack'),

driesvints commented 4 years ago

@gRoberts84 you're correct. No idea why we placed "default" there. I'll update the docs.