Package com.opengamma.util.log

Examples of com.opengamma.util.log.ThreadLocalLogEventListener


    compilationContext.setRawComputationTargetResolver(new DefaultComputationTargetResolver(securitySource, positionSource));
    final ViewComputationCacheSource computationCacheSource = new InMemoryViewComputationCacheSource(FudgeContext.GLOBAL_DEFAULT);
    final FunctionInvocationStatisticsGatherer functionInvocationStatistics = new DiscardingInvocationStatisticsGatherer();
    final FunctionExecutionContext executionContext = new FunctionExecutionContext();
    final JobDispatcher jobDispatcher = new JobDispatcher(new LocalNodeJobInvoker(new SimpleCalculationNode(computationCacheSource, compilationService, executionContext, "node",
        Executors.newCachedThreadPool(), functionInvocationStatistics, new CalculationNodeLogEventListener(new ThreadLocalLogEventListener()))));
    final ViewPermissionProvider viewPermissionProvider = new DefaultViewPermissionProvider();
    final GraphExecutorStatisticsGathererProvider graphExecutorStatisticsProvider = new DiscardingGraphStatisticsGathererProvider();
    final ViewDefinition viewDefinition = new ViewDefinition("TestView", UserPrincipal.getTestUser());
    viewDefinition.addViewCalculationConfiguration(new ViewCalculationConfiguration(viewDefinition, "default"));
    final MockConfigSource configSource = new MockConfigSource();
View Full Code Here


    _configSource = configSource;

    final FunctionExecutionContext functionExecutionContext = getFunctionExecutionContext() != null ? getFunctionExecutionContext() : generateFunctionExecutionContext();
    functionExecutionContext.setSecuritySource(securitySource);

    final ThreadLocalLogEventListener threadLocalLogListener = new ThreadLocalLogEventListener();
    LogBridge.getInstance().addListener(threadLocalLogListener);
    final SimpleCalculationNode localCalcNode = new SimpleCalculationNode(cacheSource, compiledFunctions, functionExecutionContext, "node", Executors.newCachedThreadPool(),
        new DiscardingInvocationStatisticsGatherer(), new CalculationNodeLogEventListener(threadLocalLogListener));
    final LocalNodeJobInvoker jobInvoker = new LocalNodeJobInvoker(localCalcNode);
    vpFactBean.setComputationJobDispatcher(new JobDispatcher(jobInvoker));
View Full Code Here

    cfs.initialize();
    return cfs;
  }

  public TestCalculationNode() {
    this(new ThreadLocalLogEventListener());
  }
View Full Code Here

  private FunctionBlacklistMaintainer _blacklistUpdate;
  private MaximumJobItemExecutionWatchdog _maxJobItemExecution;
  private final ThreadLocalLogEventListener _threadLocalLogListener;

  public SimpleCalculationNodeFactory() {
    _threadLocalLogListener = new ThreadLocalLogEventListener();
    LogBridge.getInstance().addListener(_threadLocalLogListener);
  }
View Full Code Here

  }

  //-------------------------------------------------------------------------
  public void testLogIndicators() throws Exception {
    final MockFunction mockFunction = getMockLoggingFunction();
    final ThreadLocalLogEventListener logEventListener = new ThreadLocalLogEventListener();
    final TestCalculationNode calcNode = new TestCalculationNode(logEventListener);
    CalculationNodeUtils.configureTestCalcNode(calcNode, mockFunction);
    final CalculationJob calcJob = CalculationNodeUtils.getCalculationJob(mockFunction, ExecutionLogMode.INDICATORS);
    final CalculationJobResultItem resultItemLogIndicators = getResultWithLogging(mockFunction, logEventListener, calcNode, calcJob);
View Full Code Here

    assertNull(executionLog.getExceptionStackTrace());
  }

  public void testLogFull() throws Exception {
    final MockFunction mockFunction = getMockLoggingFunction();
    final ThreadLocalLogEventListener logEventListener = new ThreadLocalLogEventListener();
    final TestCalculationNode calcNode = new TestCalculationNode(logEventListener);
    CalculationNodeUtils.configureTestCalcNode(calcNode, mockFunction);
    final CalculationJob calcJob = CalculationNodeUtils.getCalculationJob(mockFunction, ExecutionLogMode.FULL);
    final CalculationJobResultItem resultItemLogIndicators = getResultWithLogging(mockFunction, logEventListener, calcNode, calcJob);
View Full Code Here

TOP

Related Classes of com.opengamma.util.log.ThreadLocalLogEventListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.