I spent a couple of hours trying to figure out why several different Monolog handlers weren't working with my site using Klein. Finally dove into the source code of each to figure out it was a send_headers() type of issue.
The fix is to use Klein's afterDispatch() method, which is otherwise unmentioned in the
Readme file or the PHPDocs.
I'm not sure of the best place for this in the docs, so chose a section that seemed to fit okay. Feel free to move it around, or leave it out entirely if the method isn't meant for general use.
I spent a couple of hours trying to figure out why several different Monolog handlers weren't working with my site using Klein. Finally dove into the source code of each to figure out it was a
send_headers()
type of issue.The fix is to use Klein's
afterDispatch()
method, which is otherwise unmentioned in the Readme file or the PHPDocs.I'm not sure of the best place for this in the docs, so chose a section that seemed to fit okay. Feel free to move it around, or leave it out entirely if the method isn't meant for general use.