How to enable logging usage data in Open DACS API?

I would like my Open DACS Java application logs usage data.
It performs permission checks against the connecting users but there is no usage
associated to any user; there is no usage file. How to do this?

Find more posts tagged with

Sort by:
1 - 1 of 11

    To enable logging usage data to log login and permission check
    events of the users, please follow the steps below:

    1. DACS has to enable what
      type of usage logging can be logged on DACS UI/Console at Tools -> Usage -> Set
      Usage Logging Filters…
      and select Eventsto log as example shown below that enables to log all events:

    image 2. The Open DACS application specifies
    the preference usage logging(com.reuters.rfa.dacs.AuthorizationUsageType class) which can be:

    • DONT_PERFORM_USAGE_LOGGING - usage logging
      should not be performed
    • ALWAYS_PERFORM_USAGE_LOGGING - usage logging
      should be performed
    • ONLY_SUCCESS_PERFORM_USAGE_LOGGING
      - usage logging should be performed for the specified
      Authorization operation only if the operation produced an access success.
    • ONLY_DENIAL_PERFORM_USAGE_LOGGING - usage logging
      should be performed for the specified Authorization operation only if the
      operation produced an access denial.

    When it logs in and
    checks authorization subscription. For example:

    // All operations of usage logging performed.
    AuthorizationUsageType usage = AuthorizationUsageType.ALWAYS_PERFORM_USAGE_LOGGING;
    // Encapsulate the principal instance in the AuthorizationRequest instance.
    AuthorizationRequest request = new AuthorizationRequest();
    // Set usage logging filter when log-in event occurs.
    request.setUsageLogging(usage);
    ..
    // Check subscription of item with the DACS server.
    authCheckResult = _agent.checkSubscription(_handle, usage,_reqtype,authCheckStatus,_serviceName, itemName, lockData);

    3. Make the OpenDACS application
    waits for the usage is logged. Since the usage
    will be logged periodically around 5 seconds and it will not be logged after AuthorizationSystem.release(), the application
    should wait for the usage is logged before AuthorizationSystem.release() is called,
    for example:

    try 
    {
    //sleep 10 second to wait for usage is logged
    //before releasing AuthorizationSystem
    Thread.sleep(10000);
    }catch(Exception e) {
    e.printStackTrace();
    }
    //closing the connection from the dacs sink daemon.
    //The method destroys AuthorizationAgent, releases AuthorizationSystem and destroys EventQueue.
    client.closeDaemonConnection(true);

    4.Disable Rendezvous transport
    in dacs.env. DACS sink daemon with Rendezvous-enabled
    flushes its cache of usage data to DACS infrastructure. Hence, usage data is
    not written in the usage file. Please make sure that all DACS_RV parameters do not exist or are commented. The example of dacs.env:

    #DACS_RV_PROTO="TRUE,7999,;224.1.1.5,tcp:192.168.27.52:7500"; export DACS_RV_PROTO
    #DACS_RV_SENDRATE="3,15,30,63,123,243,-"; export DACS_RV_SENDRATE
    #DACS_RV_USAGE_SIZE="4194304"; export DACS_RV_USAGE_SIZE
    #DACS_RV_USAGE_AGE="1440"; export DACS_RV_USAGE_AGE