From 5ba874b5c956437ed6b19321b738c1c30a318532 Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Sun, 12 Sep 2010 13:01:01 +0000 Subject: [PATCH] Exceptions logging verbosity improved --- IISMainHandler/WebContext.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/IISMainHandler/WebContext.cs b/IISMainHandler/WebContext.cs index 022789e..23f9ca6 100644 --- a/IISMainHandler/WebContext.cs +++ b/IISMainHandler/WebContext.cs @@ -154,7 +154,10 @@ namespace FLocal.IISHandler { public void LogError(Exception e) { using(StreamWriter writer = new StreamWriter(Common.Config.instance.dataDir + "Logs\\" + DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss") + "." + e.GetGuid().ToString() + ".txt")) { - writer.WriteLine("Requested url: " + this.httprequest.RawUrl); + writer.WriteLine("Requested url: " + this.httprequest.Url.ToString()); + foreach(string key in this.httprequest.Form.Keys) { + writer.WriteLine(string.Format("Form[{0}]: {1}", key, this.httprequest.Form[key])); + } writer.WriteLine("Remote ip: " + this.httprequest.UserHostAddress); if(this.httprequest.UrlReferrer != null) { writer.WriteLine("Referer: " + this.httprequest.UrlReferrer.ToString());