當前位置: 首頁>>代碼示例>>Java>>正文


Java LogUtil.d方法代碼示例

本文整理匯總了Java中com.facebook.stetho.common.LogUtil.d方法的典型用法代碼示例。如果您正苦於以下問題:Java LogUtil.d方法的具體用法?Java LogUtil.d怎麽用?Java LogUtil.d使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.facebook.stetho.common.LogUtil的用法示例。


在下文中一共展示了LogUtil.d方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: bindToSocket

import com.facebook.stetho.common.LogUtil; //導入方法依賴的package包/類
@Nonnull
private static LocalServerSocket bindToSocket(String address) throws IOException {
  int retries = MAX_BIND_RETRIES;
  IOException firstException = null;
  do {
    try {
      if (LogUtil.isLoggable(Log.DEBUG)) {
        LogUtil.d("Trying to bind to @" + address);
      }
      return new LocalServerSocket(address);
    } catch (BindException be) {
      LogUtil.w(be, "Binding error, sleep " + TIME_BETWEEN_BIND_RETRIES_MS + " ms...");
      if (firstException == null) {
        firstException = be;
      }
      Util.sleepUninterruptibly(TIME_BETWEEN_BIND_RETRIES_MS);
    }
  } while (retries-- > 0);

  throw firstException;
}
 
開發者ID:facebook,項目名稱:stetho,代碼行數:22,代碼來源:LocalSocketServer.java

示例2: updateTree

import com.facebook.stetho.common.LogUtil; //導入方法依賴的package包/類
private void updateTree() {
  long startTimeMs = SystemClock.elapsedRealtime();

  ShadowDocument.Update docUpdate = createShadowDocumentUpdate();
  boolean isEmpty = docUpdate.isEmpty();
  if (isEmpty) {
    docUpdate.abandon();
  } else {
    applyDocumentUpdate(docUpdate);
  }

  long deltaMs = SystemClock.elapsedRealtime() - startTimeMs;
  LogUtil.d(
      "Document.updateTree() completed in %s ms%s",
      Long.toString(deltaMs),
      isEmpty ? " (no changes)" : "");
}
 
開發者ID:facebook,項目名稱:stetho,代碼行數:18,代碼來源:Document.java

示例3: maybeRegister

import com.facebook.stetho.common.LogUtil; //導入方法依賴的package包/類
private static void maybeRegister(DescriptorMap map, @Nullable FragmentCompat compat) {
    if (compat != null) {
        Class<?> fragmentClass = compat.getFragmentClass();
        LogUtil.d("Adding support for %s", fragmentClass.getName());
        map.registerDescriptor(fragmentClass, new RIFragmentDescriptor(compat));
    }
}
 
開發者ID:nekocode,項目名稱:ResourceInspector,代碼行數:8,代碼來源:RIFragmentDescriptor.java

示例4: getAppVersion

import com.facebook.stetho.common.LogUtil; //導入方法依賴的package包/類
public static String getAppVersion() {
    String appVersion = null;
    PackageManager packageManager = AndroidApplication.getInstance().getPackageManager();
    try {
        PackageInfo info = packageManager.getPackageInfo(AndroidApplication.getInstance().getPackageName(), 0);
        appVersion = String.valueOf(info.versionCode);
        return appVersion;
    } catch (Throwable e) {
        LogUtil.d("PhoneInfoUtils.getAppVersion()", e.toString());
    }
    return appVersion;
}
 
開發者ID:jacklongway,項目名稱:LiteSDK,代碼行數:13,代碼來源:PhoneInfoUtils.java

示例5: onInspectRequested

import com.facebook.stetho.common.LogUtil; //導入方法依賴的package包/類
public void onInspectRequested(Object element) {
  Integer nodeId = mDocument.getNodeIdForElement(element);
  if (nodeId == null) {
    LogUtil.d(
        "DocumentProvider.Listener.onInspectRequested() " +
            "called for a non-mapped node: element=%s",
        element);
  } else {
    InspectNodeRequestedEvent message = new InspectNodeRequestedEvent();
    message.nodeId = nodeId;
    mPeerManager.sendNotificationToPeers("DOM.inspectNodeRequested", message);
  }
}
 
開發者ID:facebook,項目名稱:stetho,代碼行數:14,代碼來源:DOM.java

示例6: maybeRegister

import com.facebook.stetho.common.LogUtil; //導入方法依賴的package包/類
private static void maybeRegister(DescriptorMap map, @Nullable FragmentCompat compat) {
  if (compat != null) {
    Class<?> dialogFragmentClass = compat.getDialogFragmentClass();
    LogUtil.d("Adding support for %s", dialogFragmentClass);
    map.registerDescriptor(dialogFragmentClass, new DialogFragmentDescriptor(compat));
  }
}
 
開發者ID:facebook,項目名稱:stetho,代碼行數:8,代碼來源:DialogFragmentDescriptor.java

示例7: maybeRegister

import com.facebook.stetho.common.LogUtil; //導入方法依賴的package包/類
private static void maybeRegister(DescriptorMap map, @Nullable FragmentCompat compat) {
  if (compat != null) {
    Class<?> fragmentClass = compat.getFragmentClass();
    LogUtil.d("Adding support for %s", fragmentClass.getName());
    map.registerDescriptor(fragmentClass, new FragmentDescriptor(compat));
  }
}
 
開發者ID:facebook,項目名稱:stetho,代碼行數:8,代碼來源:FragmentDescriptor.java

示例8: startScreencast

import com.facebook.stetho.common.LogUtil; //導入方法依賴的package包/類
public void startScreencast(JsonRpcPeer peer, Page.StartScreencastRequest request) {
  LogUtil.d("Starting screencast");
  mRequest = request;
  mHandlerThread = new HandlerThread("Screencast Thread");
  mHandlerThread.start();
  mPeer = peer;
  mIsRunning = true;
  mStream = new ByteArrayOutputStream();
  mBackgroundHandler = new Handler(mHandlerThread.getLooper());
  mMainHandler.postDelayed(mBitmapFetchRunnable, FRAME_DELAY);
}
 
開發者ID:facebook,項目名稱:stetho,代碼行數:12,代碼來源:ScreencastDispatcher.java

示例9: stopScreencast

import com.facebook.stetho.common.LogUtil; //導入方法依賴的package包/類
public void stopScreencast() {
  LogUtil.d("Stopping screencast");
  mBackgroundHandler.post(new CancellationRunnable());
}
 
開發者ID:facebook,項目名稱:stetho,代碼行數:5,代碼來源:ScreencastDispatcher.java


注:本文中的com.facebook.stetho.common.LogUtil.d方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。