I want to configure a remote logging service with the deobfuscate option. I know that by default, symbol maps are generated in the / WEB -INF / deploy / MODULNAME / symbolMaps folder, and the GWT remote logger implementation (RemoteLoggingServiceImpl) uses the StackTraceDeobfuscator, which requires working with the symbolMaps symbol. I think RemoteLoggingServiceImpl should automatically set the correct path to the symbolMaps directory, but in debug mode I found that the setSymbolMapsDirectory method is not being called on RemoteLoggingServiceImpl. To solve this problem, I manually call this method using a "proxy":
public class ConfigurableRemoteLoggingServiceImpl extends RemoteLoggingServiceImpl { @Override public void init(final ServletConfig config) throws ServletException { super.init(config); final String symbolMapsDirectory = config.getInitParameter("symbolMapsDirectory"); setSymbolMapsDirectory(symbolMapsDirectory); } }
and in web.xml
<servlet> <servlet-name>remoteLogging</servlet-name> <servlet-class>pl.dandelite.empik.sdl.manager.server.service.ConfigurableRemoteLoggingServiceImpl</servlet-class> <init-param> <param-name>symbolMapsDirectory</param-name> <param-value>C:/symbolMaps</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>remoteLogging</servlet-name> <url-pattern>/sdlconsole/remote_logging</url-pattern> </servlet-mapping>
and at compile time define dir using -extra parametr
This solution works, but only when I set the absolute path to the symbolMaps directory, which is a little impractical;)
Now my question is: what is the correct way to configure RemoteLoggingServiceImpl using StackTraceDeobfuscator on Tomcat?
source share