Comments (6)
I didn't think the distinction was useful. Do you use all 5 levels?
from timber.
I primarily use v d and e, I guess I can just remap my logs, just curious.
I find it hard to decide the distinctions between log levels sometimes
anyways
On Wednesday, November 20, 2013, Jake Wharton wrote:
I didn't think the distinction was useful. Do you use all 5 levels?
β
Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-28921939
.
DandrΓ© Allison (323) 823-4456
KeepandShare.com http://www.keepandshare.com
Schedule & Share. Simply. Securely.
from timber.
That's why I axed it down to four. Error: really bad exception, warning: exception but not that bad, info: app flow and status messages, debug: noisy debug-only info.
In my real apps I use the following as the only planted Tree
:
package com.squareup.wallet.data;
import com.crashlytics.android.Crashlytics;
import timber.log.Timber;
/**
* A logging implementation which reports 'info', 'warning', and 'error' logs to Crashlytics.
*/
public class CrashlyticsTree extends Timber.HollowTree {
@Override public void i(String message, Object... args) {
logMessage(message, args);
}
@Override public void i(Throwable t, String message, Object... args) {
logMessage(message, args);
// NOTE: We are explicitly not sending the exception to Crashlytics here.
}
@Override public void w(String message, Object... args) {
logMessage("WARN: " + message, args);
}
@Override public void w(Throwable t, String message, Object... args) {
logMessage("WARN: " + message, args);
// NOTE: We are explicitly not sending the exception to Crashlytics here.
}
@Override public void e(String message, Object... args) {
logMessage("ERROR: " + message, args);
}
@Override public void e(Throwable t, String message, Object... args) {
logMessage("ERROR: " + message, args);
Crashlytics.logException(t);
}
private void logMessage(String message, Object... args) {
Crashlytics.log(String.format(message, args));
}
}
from timber.
Got it, nice example.
On Nov 20, 2013 12:42 PM, "Jake Wharton" [email protected] wrote:
That's why I axed it down to four. Error: really bad exception, warning:
exception but not that bad, info: app flow and status messages, debug:
noisy debug-only info.In my real apps I use the following as the only planted Tree:
package com.squareup.wallet.data;
import com.crashlytics.android.Crashlytics;import timber.log.Timber;
/** * A logging implementation which reports 'info', 'warning', and 'error' logs to Crashlytics. */public class CrashlyticsTree extends Timber.HollowTree {
@OverRide public void i(String message, Object... args) {
logMessage(message, args);
}@OverRide public void i(Throwable t, String message, Object... args) {
logMessage(message, args);
// NOTE: We are explicitly not sending the exception to Crashlytics here.
}@OverRide public void w(String message, Object... args) {
logMessage("WARN: " + message, args);
}@OverRide public void w(Throwable t, String message, Object... args) {
logMessage("WARN: " + message, args);
// NOTE: We are explicitly not sending the exception to Crashlytics here.
}@OverRide public void e(String message, Object... args) {
logMessage("ERROR: " + message, args);
}@OverRide public void e(Throwable t, String message, Object... args) {
logMessage("ERROR: " + message, args);
Crashlytics.logException(t);
}private void logMessage(String message, Object... args) {
Crashlytics.log(String.format(message, args));
}}β
Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-28928963
.
from timber.
I'm going to close this myself. Thanks
from timber.
That's why I axed it down to four. Error: really bad exception, warning: exception but not that bad, info: app flow and status messages, debug: noisy debug-only info.
I'm using that classification too, but I used to log the HTTP traffic with v()
so that it can be filtered easily. I would appreciate it if verbose logging could be added too.
from timber.
Related Issues (20)
- Using 'Log' instead of 'Timber'
- Lint does not warn if format specifier missing
- π Iβd like to add this to the ReadMe Documentation.
- Is it possible to make isLoggable() function public?
- Escape percent symbol? HOT 2
- Is there an MDC like logback? HOT 1
- Getting a parse error when using file logging
- Timber logs not showing in Android Studio Dolphin 2021.3.1 HOT 3
- Want to bypass Lint warning BinaryOperationInTimber HOT 2
- Could not load custom lint check jar
- Make Tree:tag protected instead of internal HOT 4
- Where are the priority codes? HOT 3
- Activo
- Still `new Timber.DebugTree()` cannot be coded in Java HOT 10
- Distribution as a jar artifact HOT 2
- Gftrlgxsi
- Timber.d with %chinese throw UnknownFormatConversionException HOT 1
- https://jakewharton.github.io/timber/docs/5.x/#-1457074065%2FPackages%2F1218876905
- Anyway to add a ignore Class for tag? HOT 1
- Several lint checks not working in Kotlin files, but working ok in Java files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from timber.