You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/06/22 11:35:38 UTC

DO NOT REPLY [Bug 20993] New: - More Useful logging in RequestProcessor

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20993>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20993

More Useful logging in RequestProcessor

           Summary: More Useful logging in RequestProcessor
           Product: Struts
           Version: 1.1 RC1
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Controller
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: garyashley@toughguy.net


Is there any way we can get this added to the RequestProcessor for better 
logging.  At issue is when trying to support customer acceptance testing, and 
having the ability to know what user and what URL caused the problem.  
Initially I have it set to Error level, but Warn level is good too.

Here is the code to utilize:

In the processException()

ExceptionConfig config = mapping.findException(exception.getClass());
if (config == null) {
	if (log.isErrorEnabled()) {

		log.error(
			getInternal().getMessage(
				"unhandledException",
				request.getRequestURL().append("?").append(
					request.getQueryString()),
				request.getUserPrincipal(),
				exception.getClass()),
			exception);
	}

This change also needs to be changed in the ActionResources.properties file:

unhandledException=For the URL - [{0}] requested by User - [{1}] an Unhandled 
Exception was thrown of type: {2}

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org