generated from spatie/package-skeleton-php
-
-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Description
I noticed that my logs and exception messages weren't being reported to FlareApp during web requests, although scheduled and queued jobs were unaffected.
After some investigation, I discovered that register_shutdown_function() doesn't execute when using Nginx Unit as the application server.
To work around this issue, I called Flare::reset() in the AppServiceProvider::boot() method like this:
Code kopieren
App::terminating(function () {
if (!App::runningInConsole() && !App::runningUnitTests()) {
App::make(\Spatie\FlareClient\Flare::class)->reset();
}
});This solution worked well for us so far. However, when using Flare as the logging channel, the context of the log calls (or the correct Stack trace) gets lost and is replaced with AppServiceProvider (where Flare::reset() was called).
Does anyone know how I can preserve the log context so it displays correctly?
Metadata
Metadata
Assignees
Labels
No labels
