Examples of LogAlert


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

                      ", 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

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

        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

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

        // 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

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

  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

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

         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

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

                 
                  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

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

              // where we're mapping to is already linked somewhere else. Only case we support
              // is where this is a remapping of the same file back to where it came from
 
          if ( !from_file.equals( to_link )){
 
              Logger.log(new LogAlert(download_manager, LogAlert.REPEATABLE, LogAlert.AT_ERROR,
                              "Attempt to link to existing link '" + existing_link.toString()
                                      + "'"));
 
              return( false );
          }
      }
 
      File    existing_file = file_info.getFile( true );
 
      if ( to_link.equals( existing_file )){
 
              // already pointing to the right place
 
          return( true );
      }
 
      for (int i=0;i<info.length;i++){
 
          if ( to_link.equals( info[i].getFile( true ))){
 
              Logger.log(new LogAlert(download_manager, LogAlert.REPEATABLE, LogAlert.AT_ERROR,
                              "Attempt to link to existing file '" + info[i].getFile(true)
                                      + "'"));
 
              return( false );
          }
      }
 
      if ( to_link.exists()){
 
          if ( !existing_file.exists()){
 
                  // using a new file, make sure we recheck
 
              download_manager.recheckFile( file_info );
 
          }else{
 
                if ( FileUtil.deleteWithRecycle(
                existing_file,
                download_manager.getDownloadState().getFlag( DownloadManagerState.FLAG_LOW_NOISE ))){
 
                      // new file, recheck
 
                  download_manager.recheckFile( file_info );
 
              }else{
 
                  Logger.log(new LogAlert(download_manager, LogAlert.REPEATABLE, LogAlert.AT_ERROR,
                          "Failed to delete '" + existing_file.toString() + "'"));
 
                  return( false );
              }
          }
      }else{
 
          if ( existing_file.exists()){
 
              if ( !FileUtil.renameFile( existing_file, to_link )){
 
                  Logger.log(new LogAlert(download_manager, LogAlert.REPEATABLE, LogAlert.AT_ERROR,
                      "Failed to rename '" + existing_file.toString() + "'" ));
 
                  return( false );
              }
          }
View Full Code Here

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

              }catch( Throwable e ){
 
                Debug.printStackTrace(e);
 
                Logger.log(
                  new LogAlert(download_manager,
                    LogAlert.REPEATABLE,
                    LogAlert.AT_ERROR,
                    "Failed to change storage type for '" + res[i].getFile(true) +"': " + Debug.getNestedExceptionMessage(e)));
 
                // download's not running - tag for recheck
View Full Code Here

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

         
          az_exe = null;
         
          if (!az_exe_checked){
         
            Logger.log(new LogAlert(LogAlert.UNREPEATABLE, LogAlert.AT_WARNING,
                msg));
          }
         
          throw( new PlatformManagerException( msg ));
        }
View Full Code Here

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

          at = LogAlert.AT_ERROR;
          break;
        }
      }

      org.gudy.azureus2.core3.logging.Logger.log(new LogAlert(repeatable, at,
          message));
    }
  }
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.