Author: wesw Date: Tue Jun 2 13:50:54 2009 New Revision: 781032 URL: http://svn.apache.org/viewvc?rev=781032&view=rev Log: WW-3143 lowering log level for file upload messages
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java?rev=781032&r1=781031&r2=781032&view=diff ============================================================================== --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java Tue Jun 2 13:50:54 2009 @@ -136,7 +136,7 @@ } } } catch (FileUploadException e) { - LOG.error("Unable to parse request", e); + LOG.warn("Unable to parse request", e); errors.add(e.getMessage()); } } Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java?rev=781032&r1=781031&r2=781032&view=diff ============================================================================== --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java Tue Jun 2 13:50:54 2009 @@ -251,7 +251,7 @@ validation.addActionError(error); } - LOG.error(error); + LOG.warn(error); } } @@ -295,10 +295,10 @@ } } } else { - LOG.error(getTextMessage(action, "struts.messages.invalid.file", new Object[]{inputName}, ac.getLocale())); + LOG.warn(getTextMessage(action, "struts.messages.invalid.file", new Object[]{inputName}, ac.getLocale())); } } else { - LOG.error(getTextMessage(action, "struts.messages.invalid.content.type", new Object[]{inputName}, ac.getLocale())); + LOG.warn(getTextMessage(action, "struts.messages.invalid.content.type", new Object[]{inputName}, ac.getLocale())); } } @@ -349,28 +349,28 @@ validation.addFieldError(inputName, errMsg); } - LOG.error(errMsg); + LOG.warn(errMsg); } else if (maximumSize != null && maximumSize < file.length()) { String errMsg = getTextMessage(action, "struts.messages.error.file.too.large", new Object[]{inputName, filename, file.getName(), "" + file.length()}, locale); if (validation != null) { validation.addFieldError(inputName, errMsg); } - LOG.error(errMsg); + LOG.warn(errMsg); } else if ((!allowedTypesSet.isEmpty()) && (!containsItem(allowedTypesSet, contentType))) { String errMsg = getTextMessage(action, "struts.messages.error.content.type.not.allowed", new Object[]{inputName, filename, file.getName(), contentType}, locale); if (validation != null) { validation.addFieldError(inputName, errMsg); } - LOG.error(errMsg); + LOG.warn(errMsg); } else if ((! allowedExtensionsSet.isEmpty()) && (!hasAllowedExtension(allowedExtensionsSet, filename))) { String errMsg = getTextMessage(action, "struts.messages.error.file.extension.not.allowed", new Object[]{inputName, filename, file.getName(), contentType}, locale); if (validation != null) { validation.addFieldError(inputName, errMsg); } - LOG.error(errMsg); + LOG.warn(errMsg); } else { fileIsAcceptable = true; }