Package org.gudy.azureus2.core3.logging

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


    synchronized( this ){
     
      ArrayList<T>  new_listeners  = new ArrayList<T>( listeners );
     
      if (new_listeners.contains(listener)) {
        Logger.log(new LogEvent(LogIDs.CORE, LogEvent.LT_WARNING,
            "addListener called but listener already added for " + name
                + "\n\t" + Debug.getStackTrace(true, false)));
      }
      new_listeners.add( listener );
     
      if (new_listeners.size() > 50) {
        Logger.log(new LogEvent(LogIDs.CORE, LogEvent.LT_WARNING,
            "addListener: over 50 listeners added for " + name
                + "\n\t" + Debug.getStackTrace(true, false)));
      }
     
      listeners  = new_listeners;
View Full Code Here


  /* (non-Javadoc)
   * @see org.gudy.azureus2.ui.swt.views.AbstractIView#initialize(org.eclipse.swt.widgets.Composite)
   */
  public void initialize(Composite composite) {
    if (pieceInfoComposite != null && !pieceInfoComposite.isDisposed()) {
      Logger.log(new LogEvent(LogIDs.GUI, LogEvent.LT_ERROR,
          "PeerInfoView already initialized! Stack: "
              + Debug.getStackTrace(true, false)));
      delete();
    }
    createPeerInfoPanel(composite);
View Full Code Here

        iCol++;
      }
      oldBlockInfo = newBlockInfo;
    } catch (Exception e) {
      Logger.log(new LogEvent(LogIDs.GUI, "drawing piece map", e));
    } finally {
      gcImg.dispose();
    }

    topLabel.setText(MessageText.getString("PiecesView.BlockView.Header",
View Full Code Here

            public void widgetDisposed(DisposeEvent event)
            {
              try {
                removeWindow(shell);
              } catch (Exception e) {
                Logger.log(new LogEvent(LogIDs.GUI, "removeWindow", e));
              }
            }
        });
        shell.addListener(SWT.Show, new Listener() {
          public void handleEvent(Event event) {
View Full Code Here

             
              throw( e );
            }
            
             if (Logger.isEnabled())
              Logger.log(new LogEvent(LOGID, "Failed to open '" + file.toString()  + "', retrying", e));
           
            Thread.sleep(500);
          }
        }
       
        BDecoder  decoder = new BDecoder();
       
        if ( recovery_mode ){
         
          decoder.setRecoveryMode( true );
        }
       
        Map  res = decoder.decodeStream(bin, !skip_key_intern);
       
        if ( using_backup && !recovery_mode ){
     
          Debug.out( "Load of '" + original_file_name + "' had to revert to backup file" );
        }
       
        return( res );
       
      }catch( Throwable e ){
       
        Debug.printStackTrace( e );
       
        try
          if (bin != null){
           
            bin.close();
           
            bin  = null;
          }
        } catch (Exception x) {
         
          Debug.printStackTrace( x );
        }
       
          // if we're not recovering then backup the file
       
        if ( !recovery_mode ){
         
           // Occurs when file is there but b0rked
            // copy it in case it actually contains useful data, so it won't be overwritten next save
     
          File bad;
         
          int  bad_id = 0;
         
          while(true){
           
            File  test = new File( parent_dir, file.getName() + ".bad" + (bad_id==0?"":(""+bad_id)));
           
            if ( !test.exists()){
             
              bad  = test;
             
              break;
            }
           
            bad_id++;
          }

          if (Logger.isEnabled())
            Logger.log(new LogEvent(LOGID, LogEvent.LT_WARNING, "Read of '"
                + original_file_name + "' failed, decoding error. " + "Renaming to "
                + bad.getName()));
 
            // copy it so its left in place for possible recovery
         
View Full Code Here

      Matcher matcher = pat.matcher(f.getParent());
      if (matcher.find()) {
        String sVolume = matcher.group();
        File fVolume = new File(sVolume);
        if (!fVolume.isDirectory()) {
          Logger.log(new LogEvent(LOGID, LogEvent.LT_WARNING, sVolume
              + " is not mounted or not available."));
          return false;
        }
      }
    }
View Full Code Here

  private static void initializeSingleton() {
    try {
      class_mon.enter();
      singleton = new PlatformManagerImpl();
    } catch (Throwable e) {
      Logger.log(new LogEvent(LOGID, "Failed to initialize platform manager"
          + " for Unix Compatable OS", e));
    } finally {
      class_mon.exit();
    }
  }
View Full Code Here

        File old_home = new File(old_home_path);
        if (old_home.exists()) { //migrate
          String msg = "Migrating unix user config dir [" + old_home_path
              + "] ===> [" + temp_user_path + "]";
          System.out.println(msg);
          Logger.log(new LogEvent(LOGID,
              "SystemProperties::getUserPath(Unix): " + msg));
          try {
            old_home.renameTo(home);
          } catch (Throwable t) {
            t.printStackTrace();
            Logger.log(new LogEvent(LOGID, "migration rename failed:", t));
          }
        }
      }
    }
View Full Code Here

       
        name  = getName() + " [" + id + "]";
       
        start_time = SystemTime.getCurrentTime();
       
        Logger.log(new LogEvent( LOGID, "DMRequest start: " + name ));
       
      }catch( Throwable e ){
      }
    }
  }
View Full Code Here

    boolean  ok )
  {
    if ( DEBUG ){
     
      try{
        Logger.log(new LogEvent( LOGID, "DMRequest end: " + name + ",ok=" + ok + ", time=" + ( SystemTime.getCurrentTime() - start_time )));
       
      }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.