throws IOException, ServletException { perThreadContext.set(getServletContext()); perThreadRequest.set(request); perThreadResponse.set(response); ensureConfig(); String jsonRequestString = RPCServletUtils.readContent(request, JSON_CONTENT_TYPE, JSON_CHARSET);
private void ensureConfig() { String symbolMapsDirectory = getServletConfig().getInitParameter("symbolMapsDirectory"); String symbolMapsResourcePath = getServletConfig().getInitParameter("symbolMapsResourcePath"); if (symbolMapsResourcePath != null) { try { Logging.setStackTraceDeobfuscator( StackTraceDeobfuscator.fromUrl(getServletContext().getResource(symbolMapsResourcePath))); } catch (MalformedURLException e) { log.log(Level.WARNING, "Failed to get the symbolMaps resource", e); } } else if (symbolMapsDirectory != null) { Logging.setSymbolMapsDirectory(symbolMapsDirectory); } } }
/** * Logs a message. * * @param logRecordJson a json serialized LogRecord, as provided by * {@link com.google.gwt.logging.client.JsonLogRecordClientUtil#logRecordAsJsonObject(LogRecord)} * @throws RemoteLoggingException if logging fails */ public static void logMessage(String logRecordJson) throws RemoteLoggingException { /* * if the header does not exist, we pass null, which is handled gracefully * by the deobfuscation code. */ HttpServletRequest threadLocalRequest = RequestFactoryServlet.getThreadLocalRequest(); String strongName = null; if (threadLocalRequest != null) { // can be null during tests strongName = threadLocalRequest.getHeader(RpcRequestBuilder.STRONG_NAME_HEADER); } RemoteLoggingServiceUtil.logOnServer(logRecordJson, strongName, deobfuscator, null); }
private void ensureConfig() { String symbolMapsDirectory = getServletConfig().getInitParameter("symbolMapsDirectory"); if (symbolMapsDirectory != null) { Logging.setSymbolMapsDirectory(symbolMapsDirectory); } } }
private void ensureConfig() { String symbolMapsDirectory = getServletConfig().getInitParameter("symbolMapsDirectory"); if (symbolMapsDirectory != null) { Logging.setSymbolMapsDirectory(symbolMapsDirectory); } } }
throws IOException, ServletException { perThreadContext.set(getServletContext()); perThreadRequest.set(request); perThreadResponse.set(response); ensureConfig(); String jsonRequestString = RPCServletUtils.readContent(request, JSON_CONTENT_TYPE, JSON_CHARSET);
private void ensureConfig() { String symbolMapsDirectory = getServletConfig().getInitParameter("symbolMapsDirectory"); String symbolMapsResourcePath = getServletConfig().getInitParameter("symbolMapsResourcePath"); if (symbolMapsResourcePath != null) { try { Logging.setStackTraceDeobfuscator( StackTraceDeobfuscator.fromUrl(getServletContext().getResource(symbolMapsResourcePath))); } catch (MalformedURLException e) { log.log(Level.WARNING, "Failed to get the symbolMaps resource", e); } } else if (symbolMapsDirectory != null) { Logging.setSymbolMapsDirectory(symbolMapsDirectory); } } }
/** * Logs a message. * * @param logRecordJson a json serialized LogRecord, as provided by * {@link com.google.gwt.logging.client.JsonLogRecordClientUtil#logRecordAsJsonObject(LogRecord)} * @throws RemoteLoggingException if logging fails */ public static void logMessage(String logRecordJson) throws RemoteLoggingException { /* * if the header does not exist, we pass null, which is handled gracefully * by the deobfuscation code. */ HttpServletRequest threadLocalRequest = RequestFactoryServlet.getThreadLocalRequest(); String strongName = null; if (threadLocalRequest != null) { // can be null during tests strongName = threadLocalRequest.getHeader(RpcRequestBuilder.STRONG_NAME_HEADER); } RemoteLoggingServiceUtil.logOnServer(logRecordJson, strongName, deobfuscator, null); }
throws IOException, ServletException { perThreadContext.set(getServletContext()); perThreadRequest.set(request); perThreadResponse.set(response); ensureConfig(); String jsonRequestString = RPCServletUtils.readContent(request, JSON_CONTENT_TYPE, JSON_CHARSET);
/** * Logs a message. * * @param logRecordJson a json serialized LogRecord, as provided by * {@link com.google.gwt.logging.client.JsonLogRecordClientUtil#logRecordAsJsonObject(LogRecord)} * @throws RemoteLoggingException if logging fails */ public static void logMessage(String logRecordJson) throws RemoteLoggingException { /* * if the header does not exist, we pass null, which is handled gracefully * by the deobfuscation code. */ HttpServletRequest threadLocalRequest = RequestFactoryServlet.getThreadLocalRequest(); String strongName = null; if (threadLocalRequest != null) { // can be null during tests strongName = threadLocalRequest.getHeader(RpcRequestBuilder.STRONG_NAME_HEADER); } RemoteLoggingServiceUtil.logOnServer(logRecordJson, strongName, deobfuscator, null); }
throws IOException, ServletException { perThreadContext.set(getServletContext()); perThreadRequest.set(request); perThreadResponse.set(response); ensureConfig(); String jsonRequestString = RPCServletUtils.readContent(request, JSON_CONTENT_TYPE, JSON_CHARSET);
/** * Logs a message. * * @param logRecordJson a json serialized LogRecord, as provided by * {@link com.google.gwt.logging.client.JsonLogRecordClientUtil#logRecordAsJsonObject(LogRecord)} * @throws RemoteLoggingException if logging fails */ public static void logMessage(String logRecordJson) throws RemoteLoggingException { /* * if the header does not exist, we pass null, which is handled gracefully * by the deobfuscation code. */ HttpServletRequest threadLocalRequest = RequestFactoryServlet.getThreadLocalRequest(); String strongName = null; if (threadLocalRequest != null) { // can be null during tests strongName = threadLocalRequest.getHeader(RpcRequestBuilder.STRONG_NAME_HEADER); } RemoteLoggingServiceUtil.logOnServer(logRecordJson, strongName, deobfuscator, null); }