Skip to content
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

4.x - Add pseudo content type for log renderer in ErrorHandler #2797

Closed
adriansuter opened this issue Aug 13, 2019 · 1 comment · Fixed by #2801
Closed

4.x - Add pseudo content type for log renderer in ErrorHandler #2797

adriansuter opened this issue Aug 13, 2019 · 1 comment · Fixed by #2801
Labels

Comments

@adriansuter
Copy link
Contributor

The ErrorHandler is currently instantiating a PlainTextErrorRenderer in the writeToErrorLog-method. So a user would not be able to provide a custom log renderer.

I suggest to add a new pseudo content type "slim-log" to the array of error renderers or to add a new method setLogErrorRenderer() which takes one param ErrorRendererInterface|string|callable.

I prefer the second solution, as the first one might be a little bit hackish.

What are your thoughts?

@RyanNerd
Copy link
Contributor

@adriansuter I've created a PR #2801 for the second option setLogErrorRenderer. Please review. If the logic looks good I'll add unit tests for this feature.

bednic pushed a commit to bednic/Slim that referenced this issue Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants