[ 
https://issues.apache.org/jira/browse/WINK-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12772906#action_12772906
 ] 

Michael Elman commented on WINK-223:
------------------------------------

Another option:
{code}
                 String.format("%s (%d%s%s)", exceptionName, statusCode, 
statusSep, statusMessage);
             if (statusCode >= 500) {
                 logger.error(String.format(messageFormat, exceptionName), t);
             } else {
+                logger.info(String.format(messageFormat, exceptionName));  
+                 logger.debug(String.format(messageFormat, exceptionName), t);
-                 logger.info(String.format(messageFormat, exceptionName), t);
             }
{code}
Of course it's better to put it in if:
if (logger.isDebugEnabled()) print stacktrace, 
else print info without stacktrace.

> reduce log output on 404s
> -------------------------
>
>                 Key: WINK-223
>                 URL: https://issues.apache.org/jira/browse/WINK-223
>             Project: Wink
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 1.1
>            Reporter: Mike Rheinheimer
>             Fix For: 1.1
>
>         Attachments: WINK-223.patch
>
>
> Opinion needed:  do we need to reduce the amount of output that is logged 
> when a 404 is issued from the server?
> The logging occurs in 
> org.apache.wink.server.internal.RequestProcessor.logException.  Note that in 
> all cases, the stack trace will be printed.  Specifically, a 404 will land in 
> the logger.info, and will print a full stack trace to the log.  Is this 
> really necessary?
> On the one hand, it may be valuable to see which handler determined that a 
> client has targetted a missing resource.  On the other hand, info is probably 
> sufficient.  Also, consider what happens when a malicious client comes along 
> trying to fill up server logs or otherwise hack a server by hitting any and 
> all URLs and resource it can.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to