Package org.gudy.azureus2.core3.logging

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


    for (int i = 0; i < values.length; i++) {
      TRTrackerScraperResponseImpl response = (TRTrackerScraperResponseImpl) values[i];

      if (Logger.isEnabled()) {
        HashWrapper hash = response.getHash();
        Logger.log(new LogEvent(TorrentUtils.getDownloadManager(hash), LOGID,
            LogEvent.LT_WARNING, "Error from scrape interface " + scrapeURL
                + " : " + msg));
        //e.printStackTrace();
      }
View Full Code Here


          break;
        }
        } catch (Exception e) {
         
          if (Logger.isEnabled())
            Logger.log(new LogEvent(LOGID, LogEvent.LT_ERROR,
                "Error from scrape interface " + scrapeURL + " : "
                    + Debug.getNestedExceptionMessage(e)));

          return( null );
        }
View Full Code Here

            }else{
             
              failure_reason = ((PRUDPPacketReplyError)reply).getMessage();
             
              if (Logger.isEnabled())
                  Logger.log(new LogEvent(LOGID, LogEvent.LT_ERROR,
                      "Response from scrape interface "+ reqUrl +" : " + failure_reason));
             
              break;
            }
          }else{
   
            failure_reason = ((PRUDPPacketReplyError)reply).getMessage();
           
            if (Logger.isEnabled())
                Logger.log(new LogEvent(LOGID, LogEvent.LT_ERROR, "Response from scrape interface "+ reqUrl +" : "
                        + ((PRUDPPacketReplyError) reply).getMessage()));
         
            break;
          }
   
View Full Code Here

            class_mon.enter();
            singleton = new PlatformManagerImpl();
        }
        catch (Throwable e)
        {
          Logger.log(new LogEvent(LOGID, "Failed to initialize platform manager"
          + " for Mac OS X", e));
        }
        finally
        {
            class_mon.exit();
View Full Code Here

     
      if( !osx_app_bundle.exists() ) {
        String msg = "OSX app bundle not found: [" +osx_app_bundle.toString()+ "]";
        System.out.println( msg );
        if (Logger.isEnabled())
          Logger.log(new LogEvent(LOGID, msg));   
        throw new PlatformManagerException( msg );
      }
     
      return "open -a \"" +osx_app_bundle.toString()+ "\"";
      //return osx_app_bundle.toString() +"/Contents/MacOS/JavaApplicationStub";
View Full Code Here

    {
        File file = new File(path);
        if(!file.exists())
        {
            if (Logger.isEnabled())
              Logger.log(new LogEvent(LOGID, LogEvent.LT_WARNING, "Cannot find "
                  + file.getName()));
            return;
        }

       
View Full Code Here

    {
        File file = new File(path);
        if(!file.exists())
        {
          if (Logger.isEnabled())
            Logger.log(new LogEvent(LOGID, LogEvent.LT_WARNING, "Cannot find "
                + file.getName()));
            throw new PlatformManagerException("File not found");
        }

        showInFinder(file);
View Full Code Here

            performRuntimeExec(new String[]{"beep"});
        }
        catch (IOException e)
        {
          if (Logger.isEnabled())
            Logger.log(new LogEvent(LOGID, LogEvent.LT_WARNING,
            "Cannot play system alert"));
          Logger.log(new LogEvent(LOGID, "", e));
        }
    }
View Full Code Here

            }
        }
        else
        {
          if (Logger.isEnabled())
            Logger.log(new LogEvent(LOGID, LogEvent.LT_WARNING, "Cannot find "
                + path.getName()));
        }
    }
View Full Code Here

       
        generate_bloom = BloomFilterFactory.createAddRemove4Bit(generate_bloom.getSize() + BLOOM_INCREASE );
       
        generate_bloom_create_time  = now;
       
           Logger.lognew LogEvent(LOGID, "STS bloom: size increased to " + generate_bloom.getSize()));

      }else if ( now < generate_bloom_create_time || now - generate_bloom_create_time > BLOOM_RECREATE ){
       
        generate_bloom = BloomFilterFactory.createAddRemove4Bit(generate_bloom.getSize());
       
        generate_bloom_create_time  = now;
      }
       
      if ( hit_count >= 15 ){
       
           Logger.lognew LogEvent(LOGID, "STS bloom: too many recent connection attempts from " + originator ));
          
           Debug.out( "STS: too many recent connection attempts from " + originator );
          
        throw( new IOException( "Too many recent connection attempts (sts)"));
      }
     
      long  since_last = now - last_incoming_sts_create;
     
      long  delay = 100 - since_last;
     
        // limit key gen operations to 10 a second
     
      if ( delay > 0 && delay < 100 ){
       
        try{
            Logger.lognew LogEvent(LOGID, "STS: too many recent connection attempts, delaying " + delay ));
            
          Thread.sleep( delay );
         
        }catch( Throwable e ){
        }
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.