-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong Log path from job dispatched #52
Comments
Hi, could you detail how do you launch the job? Cheers Giacomo |
I have a same issue when i call artisan queue :
Do i need to specify the domain on each line ? I tried to pass in param the domain but same result. I launch command from web route file for my test |
Hi, are you calling the job from the same domain or from another? I.e., this line
is ran under 'my_site' domain? Let me know Giacomo |
Yes i'm calling the job or the command from the same domain. |
Ok... I will investigate asap, even I'm quite busy these days... |
Thank you :) It's not hurry, you can check later when you have times |
Okay i run some test with laravel 6, 7 and 8. For all versions, it's a fresh laravel install with your package installed. $domainParams = [
'domain_detection_function_web' => function() {
return \Illuminate\Support\Arr::get($_SERVER,'HTTP_HOST');
}
];
$app = new Gecche\Multidomain\Foundation\Application(
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__), null, $domainParams
); I make several tests with a command and a job. For both, i write a log info for check where is write the log.
I tried with php 7.2, php 7.4 and php 8.0. i have the same issue with laraval 6 and 7. I hope it's can help |
Thank you very much for your work! If it works with Laravel 8, I suspect that they have made improvements to the framework which made an improvement to my package too as a side effect :) Cheers Giacomo |
I think i found where is the issue, it's on QueueServiceProdiver. public function register()
{
parent::register();
$this->app->extend('command.queue.listen', function ($command, $app) {
return new QueueListenCommand($app['queue.listener']);
});
} On laravel 6 and 7 public function boot()
{
$this->app->singleton('command.queue.listen', function ($app) {
return new QueueListenCommand($app['queue.listener']);
});
} I tried to replace the boot method with the register method and set the same content from laravel 8 in laravel 7 provider and it works. |
Sorry for the delay... however I think that you are right... the changes you indicated (together with others) have been implemented by another user in order to get Horizon working properly with my package and I didn't propagate the changes to previous versions of the package. |
Hi, first thanks for this package. I'm making some tests and i found maybe an issue.
I'm connected on my site a. I write a log info from a http request, the log write into log file domain (storage/site_a/logs/laravel.log), all good.
But when i write a log inside a job and dispatch this job, the log write in storage/logs/laravel.log and not in storage/site_a/logs/laravel.log.
Any idea why ?
The text was updated successfully, but these errors were encountered: