Changeset 1583
- Timestamp:
- 06/18/08 15:59:31 (7 months ago)
- Files:
-
- coldbox/trunk/system/interceptors/ses.cfc (modified) (2 diffs)
- coldbox/trunk/system/plugins/logger.cfc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
coldbox/trunk/system/interceptors/ses.cfc
r1578 r1583 204 204 <!--- ************************************************************* ---> 205 205 <cfset var varMatch = "" /> 206 <cfset var valMatch = ""/> 207 <cfset var vari = "" /> 208 <cfset var vali = "" /> 206 <cfset var qsValues = "" /> 207 <cfset var qsVal = "" /> 209 208 <cfset var requestString = arguments.action /> 210 209 <cfset var routeParams = arrayNew(1) /> … … 224 223 <!--- fix URL variables (IIS only) ---> 225 224 <cfif requestString CONTAINS "?"> 225 <!--- Match the positioning of the ? ---> 226 226 <cfset varMatch = REFind("\?.*=", requestString, 1, "TRUE") /> 227 <cfset valMatch = REFind("=.*$", requestString, 1, "TRUE") /> 228 <cfset vari = Mid(requestString, (varMatch.pos[1]+1), (varMatch.len[1]-2)) /> 229 <cfset vali = Mid(requestString, (valMatch.pos[1]+1), (valMatch.len[1]-1)) /> 230 <cfset rc[vari] = vali /> 231 <cfset requestString = Mid(requestString, 1, (var_match.pos[1]-1)) /> 227 <!--- Now copy values to the RC. ---> 228 <cfset qsValues = REreplacenocase(requestString,"^.*\?","","all")> 229 <cfloop list="#qsValues#" index="qsVal" delimiters="&"> 230 <cfset rc[listFirst(qsVal,"=")] = listLast(qsVal,"=")> 231 </cfloop> 232 <!--- Clean the request string. ---> 233 <cfset requestString = Mid(requestString, 1, (varMatch.pos[1]-1)) /> 232 234 </cfif> 233 235 coldbox/trunk/system/plugins/logger.cfc
r1558 r1583 111 111 <cfset var myStringBuffer = ""> 112 112 113 <cftry> 114 <cfif getSetting("EnableColdfusionLogging") or getSetting("EnableColdboxLogging")> 115 <!--- Log Entry in the Logs ---> 116 <cfif isStruct(Exception.getExceptionStruct())> 117 <cfset myStringBuffer = getPlugin("StringBuffer").setup(BufferLength=500)> 118 <cfif Exception.getType() neq ""> 119 <cfset myStringBuffer.append( "CFErrorType=" & Exception.getType() & chr(13) )> 120 </cfif> 121 <cfif Exception.getDetail() neq ""> 122 <cfset myStringBuffer.append("CFDetails=" & Exception.getDetail() & chr(13) )> 123 </cfif> 124 <cfif Exception.getMessage() neq ""> 125 <cfset myStringBuffer.append("CFMessage=" & Exception.getMessage() & chr(13) )> 126 </cfif> 127 <cfif Exception.getStackTrace() neq ""> 128 <cfset myStringBuffer.append("CFStackTrace=" & Exception.getStackTrace() & chr(13) )> 129 </cfif> 130 <cfif Exception.getTagContextAsString() neq ""> 131 <cfset myStringBuffer.append("CFTagContext=" & Exception.getTagContextAsString() & chr(13) )> 132 </cfif> 113 <cfif getSetting("EnableColdfusionLogging") or getSetting("EnableColdboxLogging")> 114 <!--- Log Entry in the Logs ---> 115 <cfif isStruct(Exception.getExceptionStruct())> 116 <cfset myStringBuffer = getPlugin("StringBuffer").setup(BufferLength=500)> 117 <cfif Exception.getType() neq ""> 118 <cfset myStringBuffer.append( "CFErrorType=" & Exception.getType() & chr(13) )> 133 119 </cfif> 134 <!--- Log the Entry ---> 135 <cfset logEntry("error","Custom Error Message: #Exception.getExtraMessage()#",myStringBuffer.getString() )> 120 <cfif Exception.getDetail() neq ""> 121 <cfset myStringBuffer.append("CFDetails=" & Exception.getDetail() & chr(13) )> 122 </cfif> 123 <cfif Exception.getMessage() neq ""> 124 <cfset myStringBuffer.append("CFMessage=" & Exception.getMessage() & chr(13) )> 125 </cfif> 126 <cfif Exception.getStackTrace() neq ""> 127 <cfset myStringBuffer.append("CFStackTrace=" & Exception.getStackTrace() & chr(13) )> 128 </cfif> 129 <cfif Exception.getTagContextAsString() neq ""> 130 <cfset myStringBuffer.append("CFTagContext=" & Exception.getTagContextAsString() & chr(13) )> 131 </cfif> 136 132 </cfif> 137 <cfcatch type="any"><!---Silent Failure---></cfcatch> 138 </cftry> 133 <!--- Log the Entry ---> 134 <cfset logEntry("error","Custom Error Message: #Exception.getExtraMessage()#",myStringBuffer.getString() )> 135 </cfif> 139 136 140 137 <!--- Check if Bug Reports are Enabled, then send Email Bug Report ---> 141 138 <cfif getSetting("EnableBugReports") and getSetting("BugEmails") neq ""> 142 <cftry>143 139 <!--- Save the Bug Report ---> 144 140 <cfset BugReport = controller.getExceptionService().renderEmailBugReport(arguments.ExceptionBean)> … … 163 159 type="html">#BugReport#</cfmail> 164 160 </cfif> 165 <cfcatch type="any"><!---Silent Failure---></cfcatch>166 </cftry>167 161 </cfif> 168 162 </cffunction>
