Package org.gudy.azureus2.core3.logging

Examples of org.gudy.azureus2.core3.logging.LogEvent


      return( false );
    }
   
    if (length > max_read_block_size && peer_request) {
      if (Logger.isEnabled())
        Logger.log(new LogEvent(dm, LOGID, LogEvent.LT_ERROR,
            "Read invalid: " + originator + " length=" + length + " > " + max_read_block_size));
      return false;
    }

    if(!dm.getPiece(pieceNumber).isDone()) {
      Logger.log(new LogEvent(dm, LOGID, LogEvent.LT_ERROR,
          "Read invalid: " + originator + " piece #" + pieceNumber + " not done"));
      return false;
    }
   
    return true;
View Full Code Here


           
            AESemaphore pending = (AESemaphore)wait_until_idle_list.get(i);
           
            if ( pending != sem ){
           
              Logger.log(new LogEvent(LogIDs.CORE, "Waiting for " + pending.getName() + " to complete" ));
            }
          }
        }finally{
         
          tasks_mon.exit();
View Full Code Here

          trackers.put(url_str, ts);

          if( !ts.isTrackerScrapeUrlValid() ) {
 
            if (Logger.isEnabled()){
              Logger.log(new LogEvent(TorrentUtils.getDownloadManager(hash), LOGID,
                  LogEvent.LT_ERROR, "Can't scrape using url '" + trackerUrl
                      + "' as it doesn't end in " + "'/announce', skipping."));
            }
          }
      }
View Full Code Here

  runScrapes()
  {
    TRTrackerBTScraperResponseImpl nextResponseScraping = checkForNextScrape();

    if (Logger.isEnabled() && nextResponseScraping != oldResponse && nextResponseScraping != null ) {
      Logger.log(new LogEvent(
          TorrentUtils.getDownloadManager(nextResponseScraping.getHash()),
          LOGID,
          LogEvent.LT_INFORMATION,
          "Next scrape will be "
              + nextResponseScraping.getURL()
View Full Code Here

    File              file )

    throws ShareException, ShareResourceDeletionVetoException
  {
    if (Logger.isEnabled())
      Logger.log(new LogEvent(LOGID, "ShareManager: addFile '"
          + file.toString() + "'"));

    try{
      return( (ShareResourceFile)addFileOrDir( parent, file, ShareResource.ST_FILE ));
     
View Full Code Here

    File              dir )
 
    throws ShareException, ShareResourceDeletionVetoException
  {
    if (Logger.isEnabled())
      Logger.log(new LogEvent(LOGID, "ShareManager: addDir '" + dir.toString()
          + "'"));

    try{
      this_mon.enter();
     
View Full Code Here

    boolean    recursive )
 
    throws ShareException, ShareResourceDeletionVetoException
  {
    if (Logger.isEnabled())
      Logger.log(new LogEvent(LOGID, "ShareManager: addDirContents '"
          + dir.toString() + "'"));

    try{
      this_mon.enter();
     
View Full Code Here

    boolean        fire_listeners )
 
    throws ShareException
  {
    if (Logger.isEnabled())
      Logger.log(new LogEvent(LOGID, "ShareManager: resource '"
          + resource.getName() + "' deleted"));
   
    try{
      this_mon.enter();
   
View Full Code Here

      this_mon.exit();
    }
   
    try{
      if (Logger.isEnabled())
        Logger.log(new LogEvent(LOGID,
            "ShareManager: scanning resources for changes"));
 
      checkConsistency();
     
    }finally{
View Full Code Here

  {
    long startTime = System.currentTimeMillis();
    ipFilterAutoLoader.loadOtherFilters(allowAsyncDownloading, loadOldWhileAsyncDownloading);
   
    if (getNbRanges() > 0) {
      Logger.log(new LogEvent(LOGID, (System.currentTimeMillis() - startTime)
          + "ms for " + getNbRanges() + ". now loading norm"));
    }

    try{
      class_mon.enter();
   
      List new_ipRanges = new ArrayList(1024);
 
      FileInputStream fin = null;
      BufferedInputStream bin = null;
      try {
      //open the file
      File filtersFile = FileUtil.getUserFile("filters.config");
      if (filtersFile.exists()) {
        fin = new FileInputStream(filtersFile);
        bin = new BufferedInputStream(fin, 16384);
        Map map = BDecoder.decode(bin);
        List list = (List) map.get("ranges");
        Iterator iter = list.listIterator();
        while(iter.hasNext()) {
          Map range = (Map) iter.next();
          String description =  new String((byte[])range.get("description"), "UTF-8");
          String startIp =  new String((byte[])range.get("start"));
          String endIp = new String((byte[])range.get("end"));
           
          IpRangeImpl ipRange = new IpRangeImpl(description,startIp,endIp,false);

          ipRange.setAddedToRangeList(true);
         
          new_ipRanges.add( ipRange );
        }
      }   
      }finally{
     
      if ( bin != null ){
        try{
            bin.close();
        }catch( Throwable e ){
        }
      }
      if ( fin != null ){
        try{
          fin.close();
        }catch( Throwable e ){
        }
      }
     
       
        Iterator  it = new_ipRanges.iterator();
       
        while( it.hasNext()){
               
          ((IpRange)it.next()).checkValid();
        }
       
        markAsUpToDate();
      }
    }finally{
     
      class_mon.exit();
    }
    Logger.log(new LogEvent(LOGID, (System.currentTimeMillis() - startTime)
        + "ms to load all IP Filters"));
  }
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.core3.logging.LogEvent

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.