Examples of Log


Examples of htsjdk.samtools.util.Log

     * Main method for the program.  Checks that all input files are present and
     * readable and that the output file can be written to.  Then iterates through
     * all the records accumulating metrics.  Finally writes metrics file
     */
    protected int doWork() {
        final Log log = Log.getInstance(getClass());
        final ProgressLogger progress = new ProgressLogger(log);

        // Some quick parameter checking
        IOUtil.assertFileIsReadable(INPUT);
        IOUtil.assertFileIsWritable(OUTPUT);

        log.info("Reading input file and calculating metrics.");

        final SAMFileReader sam = new SAMFileReader(IOUtil.openFileForReading(INPUT));

        final MetricsFile<QualityYieldMetrics,Integer> metricsFile = getMetricsFile();
        final QualityYieldMetrics metrics = new QualityYieldMetrics();
View Full Code Here

Examples of jmathexpr.arithmetic.func.Log

        assertEquals(evaluated, Naturals.one());
       
        x.setValue(R.create(1));
        System.out.printf("  %s%n", exp.evaluate());
       
        Function log = new Log(N.create(10), N.create(1000));
        evaluated = log.evaluate();
        System.out.printf("%s = %s%n", log, evaluated);
        assertEquals(evaluated, N.create(3));
    }
View Full Code Here

Examples of jmt.engine.dataAnalysis.Log

  /**
   * Used only for test.
   */
  public static boolean test(String fileName) {
    Log writer = new Log(fileName);
    Exponential e = new Exponential();
    ExponentialPar p = null;
    try {
      p = new ExponentialPar(1.0);
    } catch (IncorrectDistributionParameterException e1) {
      e1.printStackTrace();
    }
    for (int i = 0; i < 5; i++) {
      try {
        writer.write(e.nextRand(p));
      } catch (IncorrectDistributionParameterException e1) {
        e1.printStackTrace();
      }
    }
    writer.close();
    ReplayerPar reader = new ReplayerPar(fileName);
    for (int i = 0; i < 15; i++) {
      System.out.println(reader.getNext());
    }
    return false;
View Full Code Here

Examples of net.ex337.scriptus.model.api.functions.Log

   
  }
 
  public void log(Object o) {
        ContinuationPending pending = Context.getCurrentContext().captureContinuation();
        pending.setApplicationState(new Log(o));
        throw pending;
  }
View Full Code Here

Examples of net.sf.launch4j.Log

    public void actionPerformed(ActionEvent e) {
      try {
        getGlassPane().setVisible(true);
        Worker.post(new Task() {
          public Object run() throws ExecException {
            Log log = Log.getSwingLog(_configForm.getLogTextArea());
            log.clear();
            String path = _outfile.getPath();
            if (Util.WINDOWS_OS) {
              log.append(Messages.getString("MainFrame.executing") + path);
              Util.exec(new String[] { path }, log);
            } else {
              log.append(Messages.getString("MainFrame.jar.integrity.test")
                  + path);
              Util.exec(new String[] { "java", "-jar", path }, log);
            }
            return null;
          }
View Full Code Here

Examples of net.sourceforge.pebble.logging.Log

   * @param response the HttpServletResponse instance
   * @return the name of the next view
   */
  public View process(HttpServletRequest request, HttpServletResponse response) throws ServletException {
    Blog blog = (Blog)getModel().get(Constants.BLOG_KEY);
    Log log = getLog(request, response);

    Set<String> countries = new TreeSet<String>(new Comparator<String>() {
      public int compare(String s1, String s2) {
        return s1 != null ? s1.compareToIgnoreCase(s2) : -1;
      }
    });
    Map<String,Integer> consolidatedCountries = new HashMap<String,Integer>();
    Map<String,Integer> countriesForNewsFeeds = new HashMap<String,Integer>();
    Map<String,Integer> countriesForPageViews = new HashMap<String,Integer>();
    Map<String,Integer> countriesForFileDownloads = new HashMap<String,Integer>();

    LookupService lookupService = null;

    try {
      String filename = getClass().getResource("/geo-ip.dat").toExternalForm().substring(5);
      lookupService = new LookupService(filename, LookupService.GEOIP_MEMORY_CACHE);

      for (LogEntry logEntry : log.getLogEntries()) {
        String country = lookupService.getCountry(logEntry.getHost()).getName();
        countries.add(country);
        register(country, countriesForNewsFeeds);
        register(country, countriesForPageViews);
        register(country, countriesForFileDownloads);
View Full Code Here

Examples of net.yacy.kelondro.logging.Log

        final serverObjects prop = new serverObjects();
        if ((post == null) || (env == null) || !yacyNetwork.authentifyRequest(post, env)) {
            return prop;
        }
       
        final Log log = sb.getLog();

        //int proxyPrefetchDepth = Integer.parseInt(env.getConfig("proxyPrefetchDepth", "0"));
        //int crawlingDepth = Integer.parseInt(env.getConfig("crawlingDepth", "0"));

        // request values
        final String iam        = post.get("iam", "");      // seed hash of requester
        final String youare     = post.get("youare", "");    // seed hash of the target peer, needed for network stability
        //String process    = post.get("process", "");  // process type
        final String key        = post.get("key", "");      // transmission key
        //String receivedUrlhash    = post.get("urlhash", "");  // the url hash that has been crawled
        final String result     = post.get("result", "");   // the result; either "ok" or "fail"
        final String reason     = post.get("reason", "");   // the reason for that result
        //String words      = post.get("wordh", "");    // priority word hashes
        final String propStr    = crypt.simpleDecode(post.get("lurlEntry", ""), key);
       
        /*
         the result can have one of the following values:
         negative cases, no retry
           unavailable - the resource is not available (a broken link); not found or interrupted
           exception   - an exception occurred
           robot       - a robot-file has denied to crawl that resource

         negative cases, retry possible
           rejected    - the peer has rejected to load the resource
           dequeue     - peer too busy - rejected to crawl
        
         positive cases with crawling
           fill        - the resource was loaded and processed
           update      - the resource was already in database but re-loaded and processed
  
         positive cases without crawling  
           known       - the resource is already in database, believed to be fresh and not reloaded
           stale       - the resource was reloaded but not processed because source had no changes

        */
       
        final yacySeed otherPeer = sb.peers.get(iam);
        final String otherPeerName = iam + ":" + ((otherPeer == null) ? "NULL" : (otherPeer.getName() + "/" + otherPeer.getVersion()));       

        if ((sb.peers.mySeed() == null) || (!(sb.peers.mySeed().hash.equals(youare)))) {
            // no yacy connection / unknown peers
            prop.put("delay", "3600");
            return prop;
        }
       
        if (propStr == null) {
            // error with url / wrong key
            prop.put("delay", "3600");
            return prop;
        }
       
        if ((sb.isRobinsonMode()) && (!sb.isInMyCluster(otherPeer))) {
          // we reject urls that are from outside our cluster
          prop.put("delay", "9999");
          return prop;
      }
       
        // generating a new loaded URL entry
        final URIMetadataRow entry = URIMetadataRow.importEntry(propStr);
        if (entry == null) {
            if (log.isWarning()) log.logWarning("crawlReceipt: RECEIVED wrong RECEIPT (entry null) from peer " + iam + "\n\tURL properties: "+ propStr);
            prop.put("delay", "3600");
            return prop;
        }
       
        final URIMetadataRow.Components metadata = entry.metadata();
        if (metadata.url() == null) {
            if (log.isWarning()) log.logWarning("crawlReceipt: RECEIVED wrong RECEIPT (url null) for hash " + ASCII.String(entry.hash()) + " from peer " + iam + "\n\tURL properties: "+ propStr);
            prop.put("delay", "3600");
            return prop;
        }
       
        // check if the entry is in our network domain
        final String urlRejectReason = sb.crawlStacker.urlInAcceptedDomain(metadata.url());
        if (urlRejectReason != null) {
            if (log.isWarning()) log.logWarning("crawlReceipt: RECEIVED wrong RECEIPT (" + urlRejectReason + ") for hash " + ASCII.String(entry.hash()) + " from peer " + iam + "\n\tURL properties: "+ propStr);
            prop.put("delay", "9999");
            return prop;
        }
       
        if ("fill".equals(result)) try {
            // put new entry into database
            sb.indexSegments.urlMetadata(Segments.Process.RECEIPTS).store(entry);
            ResultURLs.stack(entry, youare.getBytes(), iam.getBytes(), EventOrigin.REMOTE_RECEIPTS);
            sb.crawlQueues.delegatedURL.remove(entry.hash()); // the delegated work has been done
            if (log.isInfo()) log.logInfo("crawlReceipt: RECEIVED RECEIPT from " + otherPeerName + " for URL " + ASCII.String(entry.hash()) + ":" + metadata.url().toNormalform(false, true));

            // ready for more
            prop.put("delay", "10");
            return prop;
        } catch (final IOException e) {
View Full Code Here

Examples of nu.fw.jeti.util.Log

      }
    }
    //parse plugins? make better or make comments
    new StatusIcons(parser);
    Jeti jeti = new Jeti(backend,container);
    new Log(backend);
    new Popups(backend.getMainWindow());
    pluginsInfo = new PluginsInfo(backend,parser,this);
    jeti.init();
    if(container!=null) container.add(jeti);
    else backend.getMainWindow().setVisible(true);
View Full Code Here

Examples of org.apache.ace.log.Log

     */
    public Object addingService(ServiceReference ref) {
        // get the service based upon the reference, and return it
        // make sure the real Log will be used, and all events in the
        // cache are being flushed to the real Log.
        Log externalLog = (Log) m_context.getService(ref);
        m_proxy.setLog(externalLog);
        return externalLog;
    }
View Full Code Here

Examples of org.apache.commons.logging.Log

   
    public final static String HEADER_LOG_ID = "org.apache.synapse.transport.nhttp.headers";
    public final static String WIRE_LOG_ID = "org.apache.synapse.transport.nhttp.wire";

    public static NHttpClientHandler decorate(NHttpClientHandler handler) {
        Log log = LogFactory.getLog(handler.getClass());
        if (log.isDebugEnabled()) {
            handler = new LoggingNHttpClientHandler(log, handler);
        }
        return handler;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.