Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Reduce logging for GWT file uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Mar 19, 2014
1 parent c1c04a2 commit 2b99f94
Showing 1 changed file with 7 additions and 5 deletions.
Expand Up @@ -31,6 +31,8 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import lombok.extern.slf4j.Slf4j;

import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
Expand Down Expand Up @@ -60,6 +62,7 @@
* @author Alex Eng <a href="mailto:aeng@redhat.com">aeng@redhat.com</a>
*
*/
@Slf4j
public class FileUploadServlet extends HttpServlet {
private static final long serialVersionUID = 1L;

Expand All @@ -71,9 +74,6 @@ public class FileUploadServlet extends HttpServlet {

private TranslationService translationServiceImpl;

private static final Logger LOGGER = LoggerFactory
.getLogger(FileUploadServlet.class);

@Override
protected void doPost(final HttpServletRequest request,
final HttpServletResponse response) throws ServletException,
Expand Down Expand Up @@ -120,8 +120,10 @@ private void doWork(HttpServletRequest req, HttpServletResponse resp)
HashMap<String, FileItem> params =
new HashMap<String, FileItem>();
for (FileItem item : items) {
LOGGER.info("param- " + item.getFieldName() + " value-"
+ item.getString());
if (log.isDebugEnabled()) {
log.debug("param- " + item.getFieldName() + " value-"
+ item.getString());
}
params.put(item.getFieldName(), item);
}

Expand Down

0 comments on commit 2b99f94

Please sign in to comment.