Package org.gudy.azureus2.core3.logging

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


         
        }catch(Exception e){
         
          Debug.printStackTrace(e);
         
          Logger.log(new LogAlert(LogAlert.REPEATABLE,
            "Failed to initialise installer", e));
        }
      }
    }
View Full Code Here


          alert_queue_mon.enter();

          initialisation_complete = true;

          for (int i = 0; i < alert_queue.size(); i++) {
            LogAlert alert = alert_queue.get(i);

            showAlert(alert);
          }

          List close_alerts = COConfigurationManager.getListParameter(
              "Alerts.raised.at.close", new ArrayList());

         
          if (close_alerts.size() > 0) {

            COConfigurationManager.setParameter("Alerts.raised.at.close",
                new ArrayList());

            String intro = MessageText.getString("alert.raised.at.close")
                + "\n";

            for (int i = 0; i < close_alerts.size(); i++) {

              try {
                Map alert_map = (Map) close_alerts.get(i);

                BDecoder.decodeStrings(alert_map);
               
                String details = MapUtils.getMapString(alert_map, "details", null);
               
                int timeout = MapUtils.getMapInt(alert_map, "timeout", -1);
               
                int entryType = MapUtils.getMapInt(alert_map, "type", 0);
               
                String message = intro + MapUtils.getMapString(alert_map, "message", "");
               
                LogAlert logAlert = new LogAlert(false, entryType, message, timeout);
                logAlert.details = details;
               
                showAlert(logAlert);

              } catch (Throwable e) {
View Full Code Here

         
        }catch(Exception e){
         
          Debug.printStackTrace(e);
         
          Logger.log(new LogAlert(LogAlert.REPEATABLE,
            "Failed to initialise installer", e));
        }
      }
    }
View Full Code Here

                  try {
                    core.getTrackerHost().hostTorrent(torrent, true, false);

                  } catch (TRHostException e) {
                    Logger.log(new LogAlert(LogAlert.REPEATABLE,
                        "Host operation fails", e));
                  }
                }

              }
View Full Code Here

                      ", used=" + used +
                      ", max=" + max +
                      ": runtime free=" + runtime.freeMemory() + ", tot=" + runtime.totalMemory() + ", max=" + runtime.maxMemory());

                 Logger.logTextResource(
                   new LogAlert(
                     LogAlert.REPEATABLE,
                     LogAlert.AT_WARNING,
                    "memmon.low.warning"),
                    new String[] {
                       (mb==0?"< ":"") + DisplayFormatters.formatByteCountToKiBEtc( Math.max(1,mb)*MB, true ),
                       DisplayFormatters.formatByteCountToKiBEtc( max_heap_mb*MB, true )});
                
                 if ( mb == 1 && !increase_tried ){
                  
                   increase_tried = true;
                
                   if ( COConfigurationManager.getBooleanParameter( "jvm.heap.auto.increase.enable", true )){

                     PlatformManager platform = PlatformManagerFactory.getPlatformManager();
 
                     if ( platform.hasCapability( PlatformManagerCapabilities.AccessExplicitVMOptions )){
                      
                       try{
                         String[] options = platform.getExplicitVMOptions();
 
                         long  max_mem = getJVMLongOption( options, "-Xmx" );
 
                         if ( max_mem <= 0 ){
                          
                           max_mem = getMaxHeapMB()*MB;
                         }
                        
                         final long HEAP_AUTO_INCREASE_MAX   = 256*MB;
                         final long HEAP_AUTO_INCREASE_BY  = 16*MB;
                        
                         if ( max_mem > 0 && max_mem < HEAP_AUTO_INCREASE_MAX ){
                                                                    
                           max_mem += HEAP_AUTO_INCREASE_BY;
                          
                           if ( max_mem > HEAP_AUTO_INCREASE_MAX ){
                            
                             max_mem = HEAP_AUTO_INCREASE_MAX;
                           }
                          
                           long  last_increase = COConfigurationManager.getLongParameter( "jvm.heap.auto.increase.last", 0 );
                          
                           if ( max_mem > last_increase ){
                            
                             COConfigurationManager.setParameter( "jvm.heap.auto.increase.last", max_mem );
                                
                             options = setJVMLongOption( options, "-Xmx", max_mem );
                            
                             platform.setExplicitVMOptions( options );
                            
                              Logger.logTextResource(
                                  new LogAlert(
                                    LogAlert.REPEATABLE,
                                    LogAlert.AT_WARNING,
                                   "memmon.heap.auto.increase.warning"),
                                   new String[] {
                                      DisplayFormatters.formatByteCountToKiBEtc( max_mem, true )});
View Full Code Here

        throw (new Exception("Failed to write '" + target.toString() + "'"));
      }
    } catch (Throwable e) {

      Logger.log(
        new LogAlert(
          LogAlert.UNREPEATABLE,
          "Plugin bootstrap: initialisation error for " + target, e ));
    }
  }
View Full Code Here

        // password
     
      if ( socks_user.length() == 0 ){
       
        Logger.log(
          new LogAlert(false, LogAlert.AT_WARNING, "Socks server is requesting authentication, please setup user and password in config" ));
      }
     
      return( new PasswordAuthenticationsocks_user, socks_pw.toCharArray()));
    }
   
View Full Code Here

  checkKeyStoreHasEntry()
  {
    File  f  = new File(keystore_name);
   
    if ( !f.exists()){
      Logger.logTextResource(new LogAlert(LogAlert.UNREPEATABLE,
          LogAlert.AT_ERROR, "Security.keystore.empty"),
          new String[] { keystore_name });
     
      return( false );
    }
   
    try{
      KeyStore key_store = loadKeyStore();
     
      Enumeration enumx = key_store.aliases();
     
      if ( !enumx.hasMoreElements()){
        Logger.logTextResource(new LogAlert(LogAlert.UNREPEATABLE,
            LogAlert.AT_ERROR, "Security.keystore.empty"),
            new String[] { keystore_name });
       
        return( false );     
      }
     
    }catch( Throwable e ){
   
      Logger.logTextResource(new LogAlert(LogAlert.UNREPEATABLE,
          LogAlert.AT_ERROR, "Security.keystore.corrupt"),
          new String[] { keystore_name });
     
      return( false );     
    }
View Full Code Here

         String msg = "Memory allocation failed: Out of direct memory space.\n"
                    + "To fix: Use the -XX:MaxDirectMemorySize=512m command line option,\n"
                    + "or upgrade your Java JRE to version 1.4.2_05 or 1.5 series or newer.";
          Debug.out( msg );
         
          Logger.log(new LogAlert(LogAlert.UNREPEATABLE, LogAlert.AT_ERROR, msg));
        
         printInUse( true );
        
         throw( ex );
       }
View Full Code Here

                 
                  class_mon.exit();
                }
               
                if ( log_it ){
                   Logger.logTextResource(new LogAlert(torrent,
                       LogAlert.UNREPEATABLE, LogAlert.AT_WARNING,
                      "TrackerClient.announce.warningmessage"), new String[] {
                      announce_data_provider.getName(), warning_message });
                 }
              }
View Full Code Here

TOP

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

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.