Author: cwiklik Date: Fri Oct 9 13:58:51 2015 New Revision: 1707729 URL: http://svn.apache.org/viewvc?rev=1707729&view=rev Log: UIMA-4636 reduces agent logging. Only logs when AE transitions from Initializing to Running
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configuration/jp/AgentSession.java Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configuration/jp/AgentSession.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configuration/jp/AgentSession.java?rev=1707729&r1=1707728&r2=1707729&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configuration/jp/AgentSession.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configuration/jp/AgentSession.java Fri Oct 9 13:58:51 2015 @@ -54,6 +54,8 @@ implements IAgentSession, IJobProcessMan private volatile boolean stopped=false; + private volatile boolean log = true; + /** * JMS based adapter C'tor * @@ -107,7 +109,11 @@ implements IAgentSession, IJobProcessMan // send the process update to the remote dispatcher.dispatch(duccEvent, System.getenv("IP")); String jmx = state.getProcessJmxUrl() == null ? "N/A" : state.getProcessJmxUrl(); - logger.info("notifyAgentWithStatus",null,"... Job Process State Changed - PID:"+pid+". Process State: "+state.getState().toString()+". JMX Url:"+jmx+" Dispatched State Update Event to Agent with IP:"+System.getenv("IP")); + // only log on transition from Initializing to Running + if ( state.getState().equals(ProcessState.Running) && log ) { + log = false; + logger.info("notifyAgentWithStatus",null,"... Job Process State Changed - PID:"+pid+". Process State: "+state.getState().toString()+". JMX Url:"+jmx+" Dispatched State Update Event to Agent with IP:"+System.getenv("IP")); + } } catch( Exception e) { e.printStackTrace(); }