@Test public void testLog() throws Exception { ThrowErrorTree tree = new ThrowErrorTree(); Throwable testThrowable = new Throwable("test"); try { tree.log(Log.INFO, "tag", "message", testThrowable); fail("Expected LogPriorityExceededError"); } catch (LogPriorityExceededError e) { assertEquals(testThrowable, e.getCause()); } }
@Override protected void log(int priority, String tag, String message, Throwable t) { if (mLogExclusionStrategy.shouldSkipLog(priority, tag, message, t)) { return; } if (t != null) { throw new LogPriorityExceededError(priority, mLogPriority, t); } else { throw new LogPriorityExceededError(priority, mLogPriority); } }
ThrowErrorTree extends Timber.Tree { @Override protected void log(int priority, String tag, String message, Throwable t) { if (mLogExclusionStrategy.shouldSkipLog(priority, tag, message, t)) { return; } if (t != null) { throw new LogPriorityExceededError(priority, mLogPriority, t); } else { throw new LogPriorityExceededError(priority, mLogPriority); } } }
ThrowErrorTree extends Timber.Tree { @Override protected void log(int priority, String tag, String message, Throwable t) { if (mLogExclusionStrategy.shouldSkipLog(priority, tag, message, t)) { return; } if (t != null) { throw new LogPriorityExceededError(priority, mLogPriority, t); } else { throw new LogPriorityExceededError(priority, mLogPriority); } } ThrowErrorTree();  ThrowErrorTree(int logPriority);  ThrowErrorTree(int logPriority, LogExclusionStrategy logExclusionStrategy); }
ThrowErrorTree extends Timber.Tree { @Override protected void log(int priority, String tag, String message, Throwable t) { if (mLogExclusionStrategy.shouldSkipLog(priority, tag, message, t)) { return; } if (t != null) { throw new LogPriorityExceededError(priority, mLogPriority, t); } else { throw new LogPriorityExceededError(priority, mLogPriority); } } ThrowErrorTree();  ThrowErrorTree(int logPriority);  ThrowErrorTree(int logPriority, LogExclusionStrategy logExclusionStrategy);  }
ThrowErrorTree extends Timber.Tree { @Override protected void log(int priority, String tag, String message, Throwable t) { if (mLogExclusionStrategy.shouldSkipLog(priority, tag, message, t)) { return; } if (t != null) { throw new LogPriorityExceededError(priority, mLogPriority, t); } else { throw new LogPriorityExceededError(priority, mLogPriority); } } ThrowErrorTree();  ThrowErrorTree(int logPriority);  ThrowErrorTree(int logPriority, LogExclusionStrategy logExclusionStrategy);   }