Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package de.huxhorn.lilith.data.access.logback;
 
 
 import java.util.Date;
 
 public class LogbackAccessAdapter
 {
	{
		if(event == null)
		{
			return null;
		}
		AccessEvent result=new AccessEvent();
		result.setLocalPort(event.getLocalPort());
		result.setMethod(event.getMethod());
		result.setProtocol(event.getProtocol());
		result.setRemoteHost(event.getRemoteHost());
		result.setRemoteUser(event.getRemoteUser());
		result.setRequestURI(event.getRequestURI());
		result.setRequestURL(event.getRequestURL());
		result.setServerName(event.getServerName());
		result.setStatusCode(event.getStatusCode());
		result.setTimeStamp(new Date(event.getTimeStamp()));
		// TODO: request/response content
		return result;
	}
New to GrepCode? Check out our FAQ X