LogViewer: Log [] is not defined. Unable to create configured logger. Using emergency logger.
- LogViewer Version: 4.5
- Laravel Version: 5.6.3
- PHP Version: 7.1.3
Description:
Hi,
I did all the steps needed to install and use logviewer but when I go to http://{myproject}/log-viewer what I get is an error
laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (InvalidArgumentException(code: 0): Log [] is not defined. at /var/www/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:181)
[stacktrace]
#0 /var/www/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(115): Illuminate\\Log\\LogManager->resolve(NULL)
#1 /var/www/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(103): Illuminate\\Log\\LogManager->get(NULL)
#2 /var/www/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(572): Illuminate\\Log\\LogManager->driver()
#3 /var/www/vendor/barryvdh/laravel-debugbar/src/LaravelDebugbar.php(270): Illuminate\\Log\\LogManager->__call('listen', Array)
#4 /var/www/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(61): Barryvdh\\Debugbar\\LaravelDebugbar->boot()
#5 /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Barryvdh\\Debugbar\\Middleware\\InjectDebugbar->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#6 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#7 /var/www/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#8 /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#9 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#10 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(30): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#11 /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#12 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#13 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(30): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#14 /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#15 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#16 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#17 /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#18 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#19 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(46): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#20 /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#21 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#22 /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#23 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#24 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#25 /var/www/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#26 {main}
"}
My question is, is it not supported for Laravel Version: 5.6.3 ? I added APP_LOG=daily LOG_CHANNEL=daily in my .env file and Arcanedev\LogViewer\LogViewerServiceProvider::class on my app.php service provider section.
Thank you for your time.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 7
- Comments: 16 (6 by maintainers)
Commits related to this issue
- https://github.com/ARCANEDEV/LogViewer/issues/194 — committed to huiyonghkw/payway by deleted user 6 years ago
If you’re using Laravel 5.6, you need to update your config files if you’ve migrated from an older laravel version.
With laravel 5.6, the logging system has a dedicated file now: https://github.com/laravel/laravel/blob/master/config/logging.php
Just the
.env
file will do the job.That worked for me as soon as I copied the loggin.php file in the config directory. I recently did a compooser update
I have that error when i have update project version to 8.0 from 5.55. But Still exist.
Solution:
I had the same issue with the error in my laravel.log file. And the adding logging.php config fixed it. But I still have a question. I developed my Laravel app from scratch and it based on Laravel 5.6.5. And I didn’t have this config file in my file structure until I had added it manually… Why??? When did this file apper in Laravel app’s file structure?
OK, i see the issue.
You’re not using the daily channel for your log system.
Edit the
.env
file:LOG_CHANNEL=daily
You can delete the single log file because it’s not supported by the package:
storage/log/laravel.log
Check my comment for more details about the usage: https://github.com/ARCANEDEV/LogViewer/issues/195#issuecomment-367388830
You’re welcome. Thanks for using the package 👍
That was the issue. Thank you.