public static void wtf(String s) { if (s == null) { s = ""; } Log.wtf(TAG, s); }
public static void wtf(Throwable tr, String s) { Log.wtf(TAG, s, tr); }
public static void wtf(Throwable tr, String format, Object... args) { Log.wtf(TAG, buildMessage(format, args), tr); }
public static void wtf(String format, Object... args) { Log.wtf(TAG, buildMessage(format, args)); }
public static void wtf(String format, Object... args) { Log.wtf(TAG, buildMessage(format, args)); }
public static void wtf(Throwable tr, String format, Object... args) { Log.wtf(TAG, buildMessage(format, args), tr); }
public static void wtf(Throwable tr, String format, Object... args) { Log.wtf(TAG, buildMessage(format, args), tr); }
public static void wtf(String format, Object... args) { Log.wtf(TAG, buildMessage(format, args)); }
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; }
@OnEvent(ClickEvent.class) static void onClick(ComponentContext c, @Prop String message, @Prop Throwable throwable) { Log.wtf(TAG, message, throwable); } }
@Test public void wtf_shouldLogAppropriately_withThrowable() { Throwable throwable = new Throwable(); Log.wtf("tag", "msg", throwable); assertLogged(Log.ASSERT, "tag", "msg", throwable); }
@Test public void wtf_shouldLogAppropriately() { Log.wtf("tag", "msg"); assertLogged(Log.ASSERT, "tag", "msg", null); }
@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); } };
@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); } };
@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); }
@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); }
Log.wtf(TAG, "Failed during bridge", e); } finally { forceClose();
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); } }
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); } }
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); } }