Friday, 24 January 2020

Laravel logging.channels.single.path with queue is cached?

Im using Queue::before in AppServiceProvider.php and set logging.channels.single.path value every time when job started:

config(['logging.channels.single.path' => storage_path('logs/accounts/'.$command->acc->login.'.log')]);

When I running 1 job all ok - logs in the right place. When running 2 or more it writing logs to different files - one account can write to another accounts logfile. Why is it happening? It looks like it is caching the config variable.

Queue on horizon redis. One job after done dispatching another same job with the same $acc instance.



from Laravel logging.channels.single.path with queue is cached?

No comments:

Post a Comment