@SuppressWarnings("serial")
public class RemoteLoggerServiceImpl extends RemoteServiceServlet implements RemoteLoggerService {
public final void log(ArrayList<LogRecord> logRecords) {
for (Iterator<LogRecord> iterator = logRecords.iterator(); iterator.hasNext();) {
LogRecord record = iterator.next();
try {
HttpServletRequest request = getThreadLocalRequest();
record.set("remoteAddr", request.getRemoteAddr());
Log.log(record);
} catch (RuntimeException e) {
System.err.println("Failed to log message due to " + e.toString());
e.printStackTrace();
}