Skip to content

[Cache] Added context to log messages #36455

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

Merged
merged 1 commit into from
Apr 17, 2020
Merged

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Apr 15, 2020

Q A
Branch? master
Bug fix? no
New feature? yes
Deprecations? no
Tickets
License MIT
Doc PR n/a

In my application logs, I've got many entries like:

Failed to save key "foobar" of type string.

I know it is related to the cache, But I dont know from what adapter. I use a chain of Array, Apcu and Redis. This PR adds some context to that log entry so I know which one of my cache adapter that fails.

@nicolas-grekas
Copy link
Member

Actually, we could use get_debug_type(), that would generate better names for anonymous classes (in case this happens).

@Nyholm
Copy link
Member Author

Nyholm commented Apr 15, 2020

Thank you for the review.

Yes, that is a good idea. I've updated the PR.

@fabpot
Copy link
Member

fabpot commented Apr 17, 2020

Thank you @Nyholm.

@fabpot fabpot merged commit a85545f into symfony:master Apr 17, 2020
@Nyholm
Copy link
Member Author

Nyholm commented Apr 17, 2020

Thank you for merging

@Nyholm Nyholm deleted the cache-context branch April 17, 2020 06:43
@nicolas-grekas nicolas-grekas modified the milestones: next, 5.1 May 4, 2020
@fabpot fabpot mentioned this pull request May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants