-
Notifications
You must be signed in to change notification settings - Fork 63
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
Elmah does not capture Post data of request #425
Comments
General post data is problematic to log. See my comment in issue #164 on why.
You don't need permissions to share your work. You can do it via your own fork. You can also submit a PR here but it would be best if we discuss and agree on the design of your implementation before. As I said, it's problematic so I'm curious as to how you went about solving it. |
In Error.cs file, we can capture InputStream of Request and use StreamReader to get the string. Below is sample code
|
@ankit57 This assumes that |
Closing this as by-design. |
Elmah currently does not support logging and displaying the Post Data of the request. With all the new paradigm change of how we look at the web application now, Rest API are used pretty heavily. Capturing Post data will give more insight to the error and help debugging and reproducing the issue.
I have made the change and implemented it successfully in one of my application and wish that same be incorporated in base code so everyone can leverage the feature. I can push the code change if you make me collaborator else high level change is in Error.cs file to read the body from context.Request.InputStream. Displaying it on the log page is simple.
The text was updated successfully, but these errors were encountered: