FileDocCategorySizeDatePackage
SMSearchLogger.javaAPI DocAzureus 3.0.3.42766Mon Jul 30 21:09:18 BST 2007com.aelitis.azureus.core.speedmanager.impl.v2

SMSearchLogger

public class SMSearchLogger extends Object
Limit search diagnostics.

Fields Summary
private static final org.gudy.azureus2.core3.logging.LogIDs
ID
private static final org.gudy.azureus2.core3.util.AEDiagnosticsLogger
dLog
Constructors Summary
private SMSearchLogger()


     
Methods Summary
public static voidlog(java.lang.String str)


        //get the adapter values.
        SpeedManagerAlgorithmProviderAdapter adpter = SMInstance.getInstance().getAdapter();
        int adptCurrUpLimit = adpter.getCurrentUploadLimit();
        int adptCurrDownLimit = adpter.getCurrentDownloadLimit();

        //get the COConfigurationManager values.
        SMConfigurationAdapter conf = SMInstance.getInstance().getConfigManager();
        SpeedManagerLimitEstimate uploadSetting = conf.getUploadLimit();
        SpeedManagerLimitEstimate downloadSetting = conf.getDownloadLimit();


        StringBuffer sb = new StringBuffer(str);
        sb.append(", Download current =").append(adptCurrDownLimit);
        sb.append(", max limit =").append(downloadSetting.getString());

        sb.append(", Upload current = ").append(adptCurrUpLimit);
        sb.append(", max limit = ").append(uploadSetting.getString());

        String msg = sb.toString();

        LogEvent e = new LogEvent(ID,msg);
        Logger.log(e);

        if(dLog!=null){
            dLog.log(msg);
        }