Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

karlkras's avatar

Lumen/Laravel logging facilities.

According to the documentation, the logging service is readily available through the Log facade. However, when attempting to make a call to Log::debug("message"); , an exception stating "A facade root has not been set." is getting tossed. I'm assuming there's a configuration step I'm missing, but I've double checked that the $app->withFacades(); call is uncommented in my bootstrap/app.php file. Any help would be greatly appreciated.

0 likes
6 replies
jlrdw's avatar

Did you run a:

config:clear

if you made any config changes.

1 like
karlkras's avatar

Well, I made no configuration changes... according to documentation I've found, nothing should be needed to change?

jlrdw's avatar

@karlkras on a page where using, do you have the use statement:

use Illuminate\Support\Facades\Log;

1 like
karlkras's avatar

Of course I did this. Not the problem.

jlrdw's avatar

@karlkras I just tried it on my system, it worked:

      Log::debug("message");

Output in log:

[2021-10-23 04:31:53] local.DEBUG: message  

Do you have debug set like:

APP_DEBUG=true
2 likes
karlkras's avatar

Yep. I've followed all the obvious instructions for enabling this (ain't many) but both me and another dev working on the same code base are having the same problem. Thanks!

Please or to participate in this conversation.