Search in sources :

Example 1 with TomcatLog

use of com.creditease.tomcat.plus.util.TomcatLog in project uavstack by uavorg.

the class SpringBootTomcatPlusIT method startServer.

/**
 * startUAVServer
 */
public void startServer(String port, String appName, Object arg) {
    if (!isWebServerContext(arg)) {
        return;
    }
    // integrate Tomcat log
    UAVServer.instance().setLog(new TomcatLog("MonitorServer"));
    // start Monitor Server when server starts
    UAVServer.instance().start(new Object[] { UAVServer.ServerVendor.SPRINGBOOT });
    // set appid
    // setAppid(contextPath);
    // set the connector port
    UAVServer.instance().putServerInfo(CaptureConstants.INFO_APPSERVER_LISTEN_PORT, DataConvertHelper.toInt(port, 8080));
    InterceptSupport iSupport = InterceptSupport.instance();
    // this context will be transmited from springboot mainThread to webcontainerInit thread then back to mainThread
    InterceptContext context = iSupport.getThreadLocalContext(Event.WEBCONTAINER_STARTED);
    context.put(InterceptConstants.APPNAME, appName);
}
Also used : InterceptContext(com.creditease.monitor.interceptframework.spi.InterceptContext) InterceptSupport(com.creditease.monitor.interceptframework.InterceptSupport) TomcatLog(com.creditease.tomcat.plus.util.TomcatLog)

Example 2 with TomcatLog

use of com.creditease.tomcat.plus.util.TomcatLog in project uavstack by uavorg.

the class TomcatPlusIT method startServer.

/**
 * startUAVServer
 */
public void startServer() {
    // integrate Tomcat log
    UAVServer.instance().setLog(new TomcatLog("MonitorServer"));
    // start Monitor Server when server starts
    UAVServer.instance().start(new Object[] { UAVServer.ServerVendor.TOMCAT });
}
Also used : TomcatLog(com.creditease.tomcat.plus.util.TomcatLog)

Aggregations

TomcatLog (com.creditease.tomcat.plus.util.TomcatLog)2 InterceptSupport (com.creditease.monitor.interceptframework.InterceptSupport)1 InterceptContext (com.creditease.monitor.interceptframework.spi.InterceptContext)1