android.util.Log.wtf()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(290)

本文整理了Java中android.util.Log.wtf()方法的一些代码示例,展示了Log.wtf()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Log.wtf()方法的具体详情如下:
包路径:android.util.Log
类名称:Log
方法名:wtf

Log.wtf介绍

[英]Logs a WTF!? message to the console.
[中]

代码示例

代码示例来源:origin: grandcentrix/tray

public static void wtf(String s) {
  if (s == null) {
    s = "";
  }
  Log.wtf(TAG, s);
}

代码示例来源:origin: grandcentrix/tray

public static void wtf(Throwable tr, String s) {
  Log.wtf(TAG, s, tr);
}

代码示例来源:origin: chentao0707/SimplifyReader

public static void wtf(Throwable tr, String format, Object... args) {
  Log.wtf(TAG, buildMessage(format, args), tr);
}

代码示例来源:origin: mcxiaoke/android-volley

public static void wtf(String format, Object... args) {
  Log.wtf(TAG, buildMessage(format, args));
}

代码示例来源:origin: chentao0707/SimplifyReader

public static void wtf(String format, Object... args) {
  Log.wtf(TAG, buildMessage(format, args));
}

代码示例来源:origin: mcxiaoke/android-volley

public static void wtf(Throwable tr, String format, Object... args) {
  Log.wtf(TAG, buildMessage(format, args), tr);
}

代码示例来源:origin: jiangqqlmj/FastDev4Android

public static void wtf(Throwable tr, String format, Object... args) {
  Log.wtf(TAG, buildMessage(format, args), tr);
}

代码示例来源:origin: jiangqqlmj/FastDev4Android

public static void wtf(String format, Object... args) {
  Log.wtf(TAG, buildMessage(format, args));
}

代码示例来源:origin: termux/termux-app

private static FileDescriptor wrapFileDescriptor(int fileDescriptor) {
  FileDescriptor result = new FileDescriptor();
  try {
    Field descriptorField;
    try {
      descriptorField = FileDescriptor.class.getDeclaredField("descriptor");
    } catch (NoSuchFieldException e) {
      // For desktop java:
      descriptorField = FileDescriptor.class.getDeclaredField("fd");
    }
    descriptorField.setAccessible(true);
    descriptorField.set(result, fileDescriptor);
  } catch (NoSuchFieldException | IllegalAccessException | IllegalArgumentException e) {
    Log.wtf(EmulatorDebug.LOG_TAG, "Error accessing FileDescriptor#descriptor private field", e);
    System.exit(1);
  }
  return result;
}

代码示例来源:origin: facebook/litho

@OnEvent(ClickEvent.class)
 static void onClick(ComponentContext c, @Prop String message, @Prop Throwable throwable) {
  Log.wtf(TAG, message, throwable);
 }
}

代码示例来源:origin: robolectric/robolectric

@Test
public void wtf_shouldLogAppropriately_withThrowable() {
 Throwable throwable = new Throwable();
 Log.wtf("tag", "msg", throwable);
 assertLogged(Log.ASSERT, "tag", "msg", throwable);
}

代码示例来源:origin: robolectric/robolectric

@Test
public void wtf_shouldLogAppropriately() {
 Log.wtf("tag", "msg");
 assertLogged(Log.ASSERT, "tag", "msg", null);
}

代码示例来源:origin: firebase/firebase-jobdispatcher-android

@Override
 @BinderThread
 public void stop(Bundle invocationData, boolean needToSendResult) {
  JobInvocation.Builder invocation = getJobCoder().decode(invocationData);
  if (invocation == null) {
   Log.wtf(TAG, "stop: unknown invocation provided");
   return;
  }
  JobService.this.handleStopJobRequest(invocation.build(), needToSendResult);
 }
};

代码示例来源:origin: firebase/firebase-jobdispatcher-android

@Override
 public void jobFinished(Bundle invocationData, @JobService.JobResult int result) {
  JobInvocation.Builder invocation = getJobCoder().decode(invocationData);
  if (invocation == null) {
   Log.wtf(TAG, "jobFinished: unknown invocation provided");
   return;
  }
  ExecutionDelegator.this.onJobFinishedMessage(invocation.build(), result);
 }
};

代码示例来源:origin: firebase/firebase-jobdispatcher-android

@Override
@BinderThread
public void start(Bundle invocationData, IJobCallback callback) {
 JobInvocation.Builder invocation = getJobCoder().decode(invocationData);
 if (invocation == null) {
  Log.wtf(TAG, "start: unknown invocation provided");
  return;
 }
 JobService.this.handleStartJobRequest(invocation.build(), callback);
}

代码示例来源:origin: robolectric/robolectric

@Test
public void wtf_wtfIsFatalIsSet_shouldThrowTerribleFailure() {
 ShadowLog.setWtfIsFatal(true);
 Throwable throwable = new Throwable();
 try {
  Log.wtf("tag", "msg", throwable);
  fail("TerribleFailure should be thrown");
 } catch (ShadowLog.TerribleFailure e) {
  // pass
 }
 assertLogged(Log.ASSERT, "tag", "msg", throwable);
}

代码示例来源:origin: android-hacker/VirtualXposed

Log.wtf(TAG, "Failed during bridge", e);
} finally {
  forceClose();

代码示例来源:origin: huxq17/XRefreshView

public static void wtf(String content, Throwable tr) {
  if (!allowWtf) return;
  StackTraceElement caller = getCallerStackTraceElement();
  String tag = generateTag(caller);
  if (customLogger != null) {
    customLogger.wtf(tag, content, tr);
  } else {
    Log.wtf(tag, content, tr);
  }
}

代码示例来源:origin: huxq17/XRefreshView

public static void wtf(String content) {
  if (!allowWtf) return;
  StackTraceElement caller = getCallerStackTraceElement();
  String tag = generateTag(caller);
  if (customLogger != null) {
    customLogger.wtf(tag, content);
  } else {
    Log.wtf(tag, content);
  }
}

代码示例来源:origin: huxq17/XRefreshView

public static void wtf(Throwable tr) {
  if (!allowWtf) return;
  StackTraceElement caller = getCallerStackTraceElement();
  String tag = generateTag(caller);
  if (customLogger != null) {
    customLogger.wtf(tag, tr);
  } else {
    Log.wtf(tag, tr);
  }
}

相关文章

微信公众号

最新文章

更多