This method lists the available target and logs them.
765269
public static void listTargets( List<TargetHandler> targetHandlers, Logger logger ) {

		if( targetHandlers.isEmpty()) {
			logger.info( "No target was found for Roboconf's DM." );

		} else {
			StringBuilder sb = new StringBuilder( "Available target in Roboconf's DM: " );
			for( Iterator<TargetHandler> it = targetHandlers.iterator(); it.hasNext(); ) {
				sb.append( it.next().getTargetId());
				if( it.hasNext())
					sb.append( ", " );
			}

			sb.append( "." );
			logger.info( sb.toString());
		}
	}
429465
def executing(self):
    """"""
    self._set_target_root_count_in_runtracker()
    yield
    metrics = self._scheduler.metrics()
    self.run_tracker.pantsd_stats.set_scheduler_metrics(metrics)
    engine_workunits = self._scheduler.engine_workunits(metrics)
    if engine_workunits:
      self.run_tracker.report.bulk_record_workunits(engine_workunits)
    self._set_affected_target_count_in_runtracker()
703034
def _log(file_list, list_name, in_path):
    """"""
    file_names = '\n'.join(file_list)
    LOG.debug("\nDiscovered %(size)d %(name)s file(s) in %(path)s:\n"
              "%(files)s\n",
              {'size': len(file_list), 'name': list_name, 'path': in_path,
               'files': file_names})
516806
def _list_result_paths(target_path, log_file_name='log'):
    """"""

    result_list = []

    for root, _dirs, _files in os.walk(os.path.abspath(target_path)):
        for name in _files:
            if name == log_file_name:
                result_list.append(root)

    return result_list
206644
public void setTargeting(com.google.api.ads.admanager.axis.v201805.Targeting targeting) {
        this.targeting = targeting;
    }
1323317
@Command(name = "AddLoggingTarget", inTypeDesc = "Str[i]=Device-name. Str[i+1]=Target-type::Target-name")
    public void addLoggingTarget(final String[] argin) throws DevFailed {
        if (argin.length % 2 != 0) {
            throw DevFailedUtils.newDevFailed(INPUT_ERROR, "argin must be of even size");
        }
        for (int i = 0; i < argin.length - 1; i = i + 2) {
            final String deviceName = argin[i];
            final String[] config = argin[i + 1].split(LoggingManager.LOGGING_TARGET_SEPARATOR);
            if (config.length != 2) {
                throw DevFailedUtils.newDevFailed(INPUT_ERROR, "config must be of size 2: targetType::targetName");
            }
            if (config[0].equalsIgnoreCase(LoggingManager.LOGGING_TARGET_DEVICE)) {
                Class<?> className = null;
                for (final DeviceClassBuilder deviceClass : classList) {
                    if (deviceClass.containsDevice(deviceName)) {
                        className = deviceClass.getDeviceClass();
                        break;
                    }
                }
                if (className != null) {
                    LoggingManager.getInstance().addDeviceAppender(config[1], className, deviceName);

                }
            } else {
                LoggingManager.getInstance().addFileAppender(config[1], deviceName);
            }
        }
    }
185645
public void log() {
        for (int c=0; c<this.values.length; c++) {
            this.values[c] = s.log(this.values[c]);
        }
    }
523159
def loggers(self):
        """"""
        ret = []
        if self.logger_name:
            if isinstance(self.logger_name, logging.Logger):
                ret.append((self.logger_name.name, self.logger_name))
            else:
                ret.append((self.logger_name, logging.getLogger(self.logger_name)))

        else:
            ret = list(logging.Logger.manager.loggerDict.items())
            ret.append(("root", logging.getLogger()))
        return ret
72997
def _fetch_targets(self, api_client, q, target):
        '''
        
        '''
        # Handle & format the target type
        target_type, response_attribute, list_method_name, list_params, ignore_list_error = target
        list_method = getattr(api_client, list_method_name)
        try:
            targets = handle_truncated_response(list_method, list_params, [response_attribute])[response_attribute]
        except Exception as e:
            if not ignore_list_error:
                printException(e)
            targets = []
        setattr(self, '%s_count' % target_type, len(targets))
        self.fetchstatuslogger.counts[target_type]['discovered'] += len(targets)
        region = api_client._client_config.region_name
        # Queue resources
        for target in targets:
            # call callback methods
            try:
                callback = getattr(self, 'parse_%s' % target_type[0:-1])
            except:
                callback = self.store_target
                target['scout2_target_type'] = target_type
            if q:
                # Add to the queue
                q.put((callback, region, target))
1315539
def get_logs(self):
        
        if self.retrieved:
            raise errors.IllegalState('List has already been retrieved.')
        self.retrieved = True
        return objects.LogList(self._results, runtime=self._runtime)
155216
def _set_affected_target_count_in_runtracker(self):
    """"""
    target_count = len(self.build_graph)
    self.run_tracker.pantsd_stats.set_affected_targets_size(target_count)
    return target_count
1354705
public synchronized void markForRebuild(final TargetInfo targetInfo) {
    //
    // if it must already be rebuilt, no need to check further
    //
    if (!targetInfo.getRebuild()) {
      final TargetHistory history = get(targetInfo.getConfiguration().toString(), targetInfo.getOutput().getName());
      if (history == null) {
        targetInfo.mustRebuild();
      } else {
        final SourceHistory[] sourceHistories = history.getSources();
        final File[] sources = targetInfo.getSources();
        if (sourceHistories.length != sources.length) {
          targetInfo.mustRebuild();
        } else {
          final Hashtable<String, File> sourceMap = new Hashtable<>(sources.length);
          for (final File source : sources) {
            try {
              sourceMap.put(source.getCanonicalPath(), source);
            } catch (final IOException ex) {
              sourceMap.put(source.getAbsolutePath(), source);
            }
          }
          for (final SourceHistory sourceHistorie : sourceHistories) {
            //
            // relative file name, must absolutize it on output
            // directory
            //
            final String absPath = sourceHistorie.getAbsolutePath(this.outputDir);
            File match = sourceMap.get(absPath);
            if (match != null) {
              try {
                match = sourceMap.get(new File(absPath).getCanonicalPath());
              } catch (final IOException ex) {
                targetInfo.mustRebuild();
                break;
              }
            }
            if (match == null || match.lastModified() != sourceHistorie.getLastModified()) {
              targetInfo.mustRebuild();
              break;
            }
          }
        }
      }
    }
  }
601606
def logs(self):
        
        for record in self.history:
            if (record["when"] >= self.options.since.date
                    and record["when"] < self.options.until.date):
                for change in record["changes"]:
                    yield record["who"], change
390751
@Scheduled(cron = "${deployer.main.targets.scan.scheduling.cron}")
    public void scanTargets() {
        try {
            targetService.resolveTargets();
        } catch (DeployerException e) {
            logger.error("Scheduled target scan failed", e);
        }
    }
82876
public static void logMethodCalls() {
    Logger logger = Logger.getLogger(Datastore.class.getName());
    logger.setLevel(Level.FINE);
    if (!Arrays.asList(logger.getHandlers()).contains(getStreamHandler())) {
      logger.addHandler(getStreamHandler());
    }
  }
1353163
public String[] get_logging_target(final DeviceProxy deviceProxy) throws DevFailed {
        // Get connection on administration device
        if (deviceProxy.getAdm_dev() == null) {
            import_admin_device(deviceProxy, "get_logging_target");
        }

        // Prepeare data
        final DeviceData argin = new DeviceData();
        argin.insert(get_name(deviceProxy));
        // And send command
        final DeviceData argout = deviceProxy.getAdm_dev().command_inout("GetLoggingTarget", argin);
        return argout.extractStringArray();
    }
1069454
public void handlerAppears( IMonitoringHandler handler ) {

		if( handler != null ) {
			this.logger.info( "Monitoring handler '" + handler.getName() + "' is now available." );
			this.handlers.add( handler );
			listHandlers( this.handlers, this.logger );
		}
	}