Examples of LogEvent


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

          }
          catch (UnsupportedEncodingException e1) {
            //Do nothing and process next.
          }
          catch (Throwable e) {
            Logger.log(new LogEvent(LOGID,
                "Error while loading downloads.  " +
                "One download may not have been added to the list.", e));
          }
        }
 
        // This is set to true by default, but once the downloads have been loaded, we have no reason to ever
        // to do this check again - we only want to do it once to upgrade the state of existing downloads
        // created before this code was around.
        COConfigurationManager.setParameter("Set Completion Flag For Completed Downloads On Start", false);
 
        //load pause/resume state
        ArrayList pause_data = (ArrayList)map.get( "pause_data" );
        if( pause_data != null ) {
          try paused_list_mon.enter();
          for( int i=0; i < pause_data.size(); i++ ) {
            Object  pd = pause_data.get(i);
 
            byte[]    key;
            boolean    force;
 
            if ( pd instanceof byte[]){
              // old style, migration purposes
              key   = (byte[])pause_data.get( i );
              force  = false;
            }else{
              Map  m = (Map)pd;
 
              key   = (byte[])m.get("hash");
              force   = ((Long)m.get("force")).intValue() == 1;
            }
            paused_list.add( new Object[]{ new HashWrapper( key ), new Boolean( force )} );
          }
          }
          finally paused_list_mon.exit()}
        }
 
 
        // Someone could have mucked with the config file and set weird positions,
        // so fix them up.
        fixUpDownloadManagerPositions();
        Logger.log(new LogEvent(LOGID, "Loaded " + managers_cow.size()
            + " torrents"));
 
      }catch( Throwable e ){
        // there's been problems with corrupted download files stopping AZ from starting
        // added this to try and prevent such foolishness
View Full Code Here

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

              - ((DownloadManager) b).getPosition();
        }
      });
   
      if (Logger.isEnabled())
        Logger.log(new LogEvent(LOGID, "Saving Download List ("
            + managers_cow.size() + " items)"));
      Map map = new HashMap();
      List list = new ArrayList(managers_cow.size());
      for (int i = 0; i < managers_cow.size(); i++) {
        DownloadManager dm = (DownloadManager) managers_cow.get(i);
View Full Code Here

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

   
    if ( exists != force_start_non_seed_exists ){
     
      force_start_non_seed_exists = exists;
     
      Logger.log(new LogEvent(LOGID, "Force start download " + (force_start_non_seed_exists?"exists":"doesn't exist") + ", modifying download weighting" ));
     
      //System.out.println( "force_start_exists->" + force_start_non_seed_exists );
     
      PeerControlSchedulerFactory.overrideWeightedPriorities( force_start_non_seed_exists  );
    }
View Full Code Here

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

  setStateDownloading()
  { 
    if (getState() == DownloadManager.STATE_SEEDING) {
      setState(DownloadManager.STATE_DOWNLOADING, true);
    } else if (getState() != DownloadManager.STATE_DOWNLOADING) {
      Logger.log(new LogEvent(this, LogIDs.CORE, LogEvent.LT_WARNING,
          "Trying to set state to downloading when state is not seeding"));
    }
  }
View Full Code Here

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

      int  hit_count = bloom.add( address_bytes );
     
      if ( hit_count > 5 ){
       
        Logger.log(
            new LogEvent(
              this,
              LogIDs.CORE,
              LogEvent.LT_WARNING,
              "Activate request for " + getDisplayName() + " from " + address + " denied as too many recently received" ));

        return( false );
      }
     
      Logger.log(new LogEvent(this, LogIDs.CORE, "Activate request for " + getDisplayName() + " from " + address ));

      long  now = SystemTime.getCurrentTime();

        // we don't really care about the bloom filter filling up and giving false positives
        // as activation events should be fairly rare
View Full Code Here

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

    try
      last_response_informed = new TRTrackerAnnouncerResponseImpl( null, _torrent.getHashWrapper(), TRTrackerAnnouncerResponse.ST_OFFLINE, TRTrackerAnnouncer.REFRESH_MINIMUM_SECS, "Initialising" );
     
    }catch( TOTorrentException e ){
     
      Logger.log(new LogEvent( _torrent, LOGID, "Torrent hash retrieval fails", e));
     
      throw( new TRTrackerAnnouncerException( "TRTrackerAnnouncer: URL encode fails"))
    }

    networks  = _networks;
View Full Code Here

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

              }
            }
          }finally{
           
            if (Logger.isEnabled()) {
              Logger.log(new LogEvent(getTorrent(), LOGID, "Deactivating " + getString( a.getAnnounceSets())));
            }

            activated.remove( a );
                       
            a.destroy();
          }
        }
      }
     
      a_it = new_announcers.iterator();
     
      while( a_it.hasNext()){
       
        TRTrackerAnnouncerHelper a = a_it.next();
       
        if ( !announcers.contains( a )){
         
          announcers.add( a );
        }
      }
     
      if ( !is_manual && announcers.size() > 0 ){
       
        if ( activated.size() == 0 ){
         
          TRTrackerAnnouncerHelper a = announcers.get(0);
         
          if (Logger.isEnabled()) {
            Logger.log(new LogEvent(getTorrent(), LOGID, "Activating " + getString( a.getAnnounceSets())));
          }

          activated.add( a );
         
          last_activation_time = SystemTime.getMonotonousTime();
View Full Code Here

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

          for ( TRTrackerAnnouncerHelper a: announcers ){
           
            if ( !activated.contains( a )){
             
              if (Logger.isEnabled()) {
                Logger.log(new LogEvent(getTorrent(), LOGID, "Activating " + getString( a.getAnnounceSets())));
              }
             
              activated.add( a );
             
              last_activation_time = SystemTime.getMonotonousTime();
View Full Code Here

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

  forceStop(
    final TRTrackerBTAnnouncerImpl    announcer,
    final URL              url )
  {
    if (Logger.isEnabled()) {
      Logger.log(new LogEvent(getTorrent(), LOGID, "Force stopping " + url + " as private torrent" ));
    }
   
    new AEThread2( "TRMux:fs", true )
    {
      public void
View Full Code Here

Examples of org.jpos.util.LogEvent

    }

    @Test
    public void testDefaultAbort() throws Throwable {
        BSHTransactionParticipant bSHTransactionParticipant = new BSHTransactionParticipant();
        bSHTransactionParticipant.defaultAbort(100L, new File("testBSHTransactionParticipantParam1"), new LogEvent());
        assertTrue("Test completed without Exception", true);
    }
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.