Improved log formatting.

This commit is contained in:
Simone Bordet 2016-03-10 10:56:51 +01:00
parent ffbd817254
commit c0bc218202
1 changed files with 5 additions and 3 deletions

View File

@ -414,7 +414,7 @@ public class Server extends HandlerWrapper implements Attributes
if (LOG.isDebugEnabled())
LOG.debug("doStop {}",this);
MultiException mex=new MultiException();
// list if graceful futures
@ -503,7 +503,8 @@ public class Server extends HandlerWrapper implements Attributes
final Response response=connection.getResponse();
if (LOG.isDebugEnabled())
LOG.debug("{} on {}{}",request.getDispatcherType(),connection,"\n"+request.getMethod()+" "+request.getHttpURI()+"\n"+request.getHttpFields());
LOG.debug("{} on {}{}{} {} {}{}{}", request.getDispatcherType(), connection, System.lineSeparator(),
request.getMethod(), target, request.getProtocol(), System.lineSeparator(), request.getHttpFields());
if (HttpMethod.OPTIONS.is(request.getMethod()) || "*".equals(target))
{
@ -517,7 +518,8 @@ public class Server extends HandlerWrapper implements Attributes
handle(target, request, request, response);
if (LOG.isDebugEnabled())
LOG.debug("RESPONSE for {} h={}{}",target,request.isHandled(),"\n"+response.getStatus()+" "+response.getReason()+"\n"+response.getHttpFields());
LOG.debug("RESPONSE for {} h={}{}{} {}{}{}", target, request.isHandled(), System.lineSeparator(),
response.getStatus(), response.getReason(), System.lineSeparator(), response.getHttpFields());
}
/* ------------------------------------------------------------ */