UsageLogging(Properties licenseProperties,String modulename,UUID runId,File configFileOverride,boolean suppress) throws IOException {
  final String usageValue=licenseProperties.getProperty(REQUIRE_USAGE);
  mRequireUsage=usageValue != null && Boolean.valueOf(usageValue);
  final String destinationValue=licenseProperties.getProperty(USAGE_DESTINATION);
  mUsageDestination=destinationValue == null ? UsageDestination.NONE : UsageDestination.valueOf(destinationValue.toUpperCase(Locale.ROOT));
  mUsageConfiguration=configFileOverride == null ? new UsageConfiguration() : new UsageConfiguration(configFileOverride);
  mModuleName=modulename;
  mRunId=runId;
  if (suppress) {
    mClient=new NullUsageLoggingClient();
  }
 else {
    if (mUsageConfiguration.isEnabled() && mUsageConfiguration.getUsageHost() != null) {
      mClient=new HttpUsageLoggingClient(mUsageConfiguration.getUsageHost(),mUsageConfiguration,requireUsage());
    }
 else     if (mUsageConfiguration.isEnabled() && allowFileLogging() && mUsageConfiguration.getUsageDir() != null) {
      mClient=new FileUsageLoggingClient(new File(mUsageConfiguration.getUsageDir()),mUsageConfiguration,requireUsage());
    }
 else     if (requireUsage()) {
      throw new NoTalkbackSlimException("Usage logging is required by license, but has not been correctly configured during install. " + SEE_MANUAL);
    }
 else {
      mClient=new NullUsageLoggingClient();
    }
  }
}

UsageLogging ( Properties licenseProperties , String modulename , UUID runId , File configFileOverride , boolean suppress ) throws IOException { final String usageValue = licenseProperties . getProperty ( REQUIRE_USAGE ) ; mRequireUsage = usageValue != null && Boolean . valueOf ( usageValue ) ; final String destinationValue = licenseProperties . getProperty ( USAGE_DESTINATION ) ; mUsageDestination = destinationValue == null ? UsageDestination . NONE : UsageDestination . valueOf ( destinationValue . toUpperCase ( Locale . ROOT ) ) ; mUsageConfiguration = configFileOverride == null ? new UsageConfiguration ( ) : new UsageConfiguration ( configFileOverride ) ; mModuleName = modulename ; mRunId = runId ; if ( suppress ) { mClient = new NullUsageLoggingClient ( ) ; } else { if ( mUsageConfiguration . isEnabled ( ) && mUsageConfiguration . getUsageHost ( ) != null ) { mClient = new HttpUsageLoggingClient ( mUsageConfiguration . getUsageHost ( ) , mUsageConfiguration , requireUsage ( ) ) ; } else if ( mUsageConfiguration . isEnabled ( ) && allowFileLogging ( ) && mUsageConfiguration . getUsageDir ( ) != null ) { mClient = new FileUsageLoggingClient ( new File ( mUsageConfiguration . getUsageDir ( ) ) , mUsageConfiguration , requireUsage ( ) ) ; } else if ( requireUsage ( ) ) { throw new NoTalkbackSlimException ( "Usage logging is required by license, but has not been correctly configured during install. " + SEE_MANUAL ) ; } else { mClient = new NullUsageLoggingClient ( ) ; } } }
sets up usage logging using a specific configuration path
