-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] allow the console logging handler to work and prevent propagation only when interactive #58715
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
[Console] allow the console logging handler to work and prevent propagation only when interactive #58715
Comments
/cc @ro0NL IIRC we spoke about this in several other issues? |
IMO the described feature would serve a similar purpose without needing to do any special setup per environment or custom handlers, just with config like shown. |
That's precisely what the interactive / non interactive thing is meant to signal: has user or not. |
if you don't configure your cron with |
@ro0NL yes, this would be opt-in since it's a new minor feature, otherwise it would be a BC break, no? |
BTW I've checked this and the issue is,
The idea might be to add it as the last arg and make it nullable and wire it up only if |
@stof (I'm pinging you because you seem to be the Monolog Bundle guy), assuming I want to work on this, am I right to understand this would be two separate PRs?
|
Description
Let's assume this setup
Now let's assume we're running some command meant for non-interactive use, like
messenger:consume
, see #57776.When running the command using logging interactively (user running the command and watching the output) currently, you'll get both the command output, console output and the logstash JSON, which is creating a giant mess of output.
What would be better is to allow the logger to know if there's a user watching the output (command is in an interactive shell or not) and then:
console
and skiplogstash
(prevent bubble) when interactiveconsole
and only outputlogstash
when not interactiveThis would mean the logging is adjusted to the current runtime better automatically.
Example
No response
The text was updated successfully, but these errors were encountered: