Set of timber trees for Crashlytics and debugging.
This library only contains Timber.Tree
implementations. Just plant it to Timber.
Timber.plant(new CrashlyticsLogExceptionTree())
Sends non-fatal exception to Crashlytics with Crashlytics.logException()
.
If no throwable is passed, it generates stack trace from caller of Timber.e() or etc. NOTE: Stack trace elements of timber code are automatically removed before sent.
Records log to Crashlytics with Crashlytics.log()
.
Recorded logs will be shown in each Crashes/Non-Fatals report.
Throws LogPriorityExceededError (extends Error) if log level exceeds specified level.
Useful when dogfooding, debugging, quality assurance. DON'T plant() this on production environment.
CrashlyticsLogTree tree = new CrashlyticsLogTree(Log.INFO);
ThrowErrorTree tree = new ThrowErrorTree(Log.ERROR, new LogExclusionStrategy() {
@Override
public boolean shouldSkipLog(int priority, String tag, String message, Throwable t) {
return message.startsWith("NO_FAIL_FAST");
}
});
Available from jCenter.
Gradle:
dependencies {
compile 'net.ypresto.timbertreeutils:timbertreeutils:1.0.0'
}
Copyright (C) 2015 Yuya Tanaka
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.