Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable Verbose mode for Laravel 4 Queue Listener

When running the Listener via php artisan queue:listen, its pretty quiet even though the Worker may be echoing something.

Question: How do you enable those echos to be displayed on the screen, similar to how php artisan queue:work does it?

like image 424
Nyxynyx Avatar asked Apr 04 '13 22:04

Nyxynyx


1 Answers

I don't believe that listen is meant to have any output, and I can't see anything in the ListenCommand that would suggest there's any more output to give. However, when you ask artisan for help it suggests --verbose (-v) which you could give a try?

php artisan queue:listen -v

My understanding of listen is that it is designed to be run as a background service, essentially calling queue:work repeatedly. If you wanted to test that a worker is working you'd just call queue:work yourself. You probably want to look at adding some logging to your code, and you'll be able to look in the log files then.


$ php artisan help queue:listen

Usage:
 queue:listen [--queue[="..."]] [--delay[="..."]] [--memory[="..."]] [--timeout[="..."]] [connection]

Arguments:
 connection            The name of connection

Options:
 --queue               The queue to listen on
 --delay               Amount of time to delay failed jobs (default: 0)
 --memory              The memory limit in megabytes (default: 128)
 --timeout             Seconds a job may run before timing out (default: 60)
 --help (-h)           Display this help message.
 --quiet (-q)          Do not output any message.
 --verbose (-v)        Increase verbosity of messages.
 --version (-V)        Display this application version.
 --ansi                Force ANSI output.
 --no-ansi             Disable ANSI output.
 --no-interaction (-n) Do not ask any interactive question.
 --env                 The environment the command should run under.> 
like image 91
Phill Sparks Avatar answered Oct 15 '22 01:10

Phill Sparks