8000 The server:log command does not show logs · Issue #32111 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
8000

The server:log command does not show logs #32111

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

Closed
maidmaid opened this issue Jun 20, 2019 · 3 comments
Closed

The server:log command does not show logs #32111

maidmaid opened this issue Jun 20, 2019 · 3 comments

Comments

@maidmaid
Copy link
Contributor

Symfony version(s) affected: 4.2

Description
The logs are not shown while we launch server:log. The only way to show them is to add -vvv option.

How to reproduce

// config/packages/dev/monolog.yaml
monolog:
    handlers:
        server_log:
            type: server_log
            host: 0:9911

And run server:log.

Possible Solution

The ConsoleHandler checks the verbosity level. By default the normal verbosity maps to the warning level log. IMO, the --filter option should be the only one responsible of the level.

if ($this->handler->isHandling($record)) {

Additional context

@javiereguiluz
Copy link
Member

@lyrixx since you are the original author of server:log ... could you please check if this behavior is intended? Thanks.

@lyrixx
Copy link
Member
lyrixx commented Jul 8, 2019

Hello,

Thanks @javiereguiluz for the ping. I missed it :)

This is weird. When I implemented this command, I did not need to use -vvv. Something has changed
:/ I will look at it

@lyrixx
Copy link
Member
lyrixx commented Jul 8, 2019

I read again everything, and actually -vvv was always need to see all log.

Anyway, I like your feeling. IMHO we should display all logs, everytime. And let the user choose what they wants thanks to --filter

@fabpot fabpot closed this as completed Jul 8, 2019
fabpot added a commit that referenced this issue Jul 8, 2019
This PR was merged into the 4.4 branch.

Discussion
----------

[ServerBundle] Display all logs by default

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #32111
| License       | MIT
| Doc PR        |

Instead of relying on `-vvv` behavior, we display all logs.
End user has two ways of filtering now:

* with the `--filter` options
* by configuring the handler in `config/dev/monolog.yaml`

Commits
-------

54b0809 [ServerBundle] Display all logs by default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
0