laravel / ideas

Issues board used for Laravel internals discussions.
938 stars 28 forks source link

[Proposal] Worker output should respect verbosity settings #1516

Open cweiske opened 5 years ago

cweiske commented 5 years ago

Goal

I want to see only errors in my (horizon) queue output, not standard messages like "processing $job" and "processed $job".

Description

Whenever a queued job is started and finished, laravel outputs log messages for them:

Processing: \App\Jobs\Foo Processing: \App\Jobs\Bar Processed: \App\Jobs\Foo Failed: \App\Jobs\Bar

It is not possible to show error messages while hiding the processing + processed messages, because the method WorkCommand::writeStatus() that writes the log messages does not send any severity information.

The currently only way to stop the processing/processed messages to appear is using ./artisan horizon --quiet, which also hides the failed error messages.

WorkCommand::writeStatus() should mark "Processing" and "Processed" messages as "verbose" and pass that as 2nd parameter to $output->writeln().

See: https://github.com/laravel/framework/issues/27483, https://github.com/laravel/framework/issues/27485

ibrunotome commented 4 years ago

I'm really looking for this too.

When your logs goes to a centralized log tool like stackdriver, and you pay for the amount of logs, you definelly wants to disable the 'Processing/Processed' logs consuming resources.