mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 12:12:08 +08:00
enhancement: #I1X83P 监控日志最好能加个开关,可以方便对日志启用和关闭。
This commit is contained in:
@@ -43,6 +43,14 @@ public class MonitorBus {
|
||||
|
||||
private ConcurrentHashMap<String, LimitQueue<CompStatistics>> statisticsMap = new ConcurrentHashMap<String, LimitQueue<CompStatistics>>();
|
||||
|
||||
public MonitorBus(boolean enableMonitorLog) {
|
||||
this.enableMonitorLog = enableMonitorLog;
|
||||
if(this.enableMonitorLog){
|
||||
Timer timer = new Timer();
|
||||
timer.schedule(new MonitorTimeTask(this), this.getDelay(), this.getPeriod());
|
||||
}
|
||||
}
|
||||
|
||||
public MonitorBus(boolean enableMonitorLog, int queueLimit, long delay, long period) {
|
||||
this.enableMonitorLog = enableMonitorLog;
|
||||
this.queueLimit = queueLimit;
|
||||
|
||||
@@ -19,4 +19,8 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean class="com.yomahub.liteflow.monitor.MonitorBus">
|
||||
<constructor-arg name="enableMonitorLog" value="true"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
||||
Reference in New Issue
Block a user